Skip to content

Commit a1dc402

Browse files
committed
Revert "AC-15170:Add official support for Symfony 7.4 LTS in Adobe Commerce 2.4.9"
This reverts commit 30d6511.
1 parent 5bc1311 commit a1dc402

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/Analyzer/ClassMethodAnalyzer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,7 @@ private function addAncestorsToArray(array $ancestors, $toAdd)
541541
private function analyzeRemainingConstructorParams($contextAfter, $methodAfter, $remainingAfter)
542542
{
543543
if (Signature::isOptionalParams($remainingAfter)) {
544-
$namespaceNode = $contextAfter->namespacedName ?? null;
545-
$namespace = $namespaceNode instanceof Name ? $namespaceNode->toString() : '';
544+
$namespace = implode('\\', $contextAfter->jsonSerialize()['namespacedName']->parts);
546545
if (in_array($namespace, $this->extendableApiClassList)) {
547546
$data = new ExtendableClassConstructorOptionalParameterAdded(
548547
$this->context,

src/Helper/ClassParser.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@ public function getParentFullClassName()
8484
$nodeTree = $this->getNamespaceNode();
8585
foreach ($nodeTree->stmts as $stmt) {
8686
if ($stmt instanceof Class_ && $stmt->extends !== null) {
87-
$extendsName = $stmt->extends;
88-
if (count($extendsName->getParts()) > 1) {
89-
return $extendsName->toString();
87+
if (count($stmt->extends->parts) > 1) {
88+
return implode("\\", $stmt->extends->parts);
9089
}
91-
$extendedClass = $extendsName->getLast();
90+
$extendedClass = end($stmt->extends->parts);
9291
}
9392
}
9493

@@ -97,12 +96,8 @@ public function getParentFullClassName()
9796
}
9897

9998
foreach ($nodeTree->stmts as $stmt) {
100-
if ($stmt instanceof Use_) {
101-
foreach ($stmt->uses as $useUse) {
102-
if ($useUse->getAlias()->toString() === $extendedClass) {
103-
return $useUse->name->toString();
104-
}
105-
}
99+
if ($stmt instanceof Use_ && $stmt->uses[0]->getAlias()->toString() === $extendedClass) {
100+
return implode("\\", $stmt->uses[0]->name->parts);
106101
}
107102
}
108103

0 commit comments

Comments
 (0)