diff --git a/packages/NodeTypeResolver/Node/AttributeKey.php b/packages/NodeTypeResolver/Node/AttributeKey.php index 26fd63f9c70..6fee57005d3 100644 --- a/packages/NodeTypeResolver/Node/AttributeKey.php +++ b/packages/NodeTypeResolver/Node/AttributeKey.php @@ -34,7 +34,7 @@ final class AttributeKey public const CLASS_NAME = 'className'; /** * @deprecated Use - * @see BetterNodeFinder to find your parent nodes. + * @see BetterNodeFinder::findParentType($node, ClassLike::class) to find your parent nodes. * * @var string */ @@ -44,6 +44,9 @@ final class AttributeKey */ public const METHOD_NAME = 'methodName'; /** + * @deprecated Use + * @see BetterNodeFinder::findParentType($node, ClassMethod::class) to find your parent nodes. + * * @var string */ public const METHOD_NODE = 'methodNode'; diff --git a/packages/NodeTypeResolver/NodeTypeResolver/ParamTypeResolver.php b/packages/NodeTypeResolver/NodeTypeResolver/ParamTypeResolver.php index 70dcf57b60c..19eb9bb3da5 100644 --- a/packages/NodeTypeResolver/NodeTypeResolver/ParamTypeResolver.php +++ b/packages/NodeTypeResolver/NodeTypeResolver/ParamTypeResolver.php @@ -15,6 +15,7 @@ use PHPStan\Type\Type; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Core\Exception\ShouldNotHappenException; +use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeNameResolver\NodeNameResolver; use Rector\NodeTypeResolver\Contract\NodeTypeResolverInterface; use Rector\NodeTypeResolver\Node\AttributeKey; @@ -47,11 +48,16 @@ final class ParamTypeResolver implements \Rector\NodeTypeResolver\Contract\NodeT * @var \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory */ private $phpDocInfoFactory; - public function __construct(\RectorPrefix20211106\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory $phpDocInfoFactory) + /** + * @var \Rector\Core\PhpParser\Node\BetterNodeFinder + */ + private $betterNodeFinder; + public function __construct(\RectorPrefix20211106\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory $phpDocInfoFactory, \Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder) { $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; $this->nodeNameResolver = $nodeNameResolver; $this->phpDocInfoFactory = $phpDocInfoFactory; + $this->betterNodeFinder = $betterNodeFinder; } /** * @required @@ -95,7 +101,7 @@ final class ParamTypeResolver implements \Rector\NodeTypeResolver\Contract\NodeT } private function resolveFromFirstVariableUse(\PhpParser\Node\Param $param) : \PHPStan\Type\Type { - $classMethod = $param->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($param, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return new \PHPStan\Type\MixedType(); } diff --git a/packages/NodeTypeResolver/NodeTypeResolver/VariableTypeResolver.php b/packages/NodeTypeResolver/NodeTypeResolver/VariableTypeResolver.php index 45975e6118a..bb158a1efea 100644 --- a/packages/NodeTypeResolver/NodeTypeResolver/VariableTypeResolver.php +++ b/packages/NodeTypeResolver/NodeTypeResolver/VariableTypeResolver.php @@ -18,10 +18,6 @@ use Rector\NodeTypeResolver\Node\AttributeKey; */ final class VariableTypeResolver implements \Rector\NodeTypeResolver\Contract\NodeTypeResolverInterface { - /** - * @var string[] - */ - private const PARENT_NODE_ATTRIBUTES = [\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE, \Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE]; /** * @var \Rector\NodeNameResolver\NodeNameResolver */ @@ -73,26 +69,18 @@ final class VariableTypeResolver implements \Rector\NodeTypeResolver\Contract\No } private function resolveNodeScope(\PhpParser\Node\Expr\Variable $variable) : ?\PHPStan\Analyser\Scope { - /** @var Scope|null $nodeScope */ - $nodeScope = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); - if ($nodeScope !== null) { - return $nodeScope; + $scope = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); + if ($scope instanceof \PHPStan\Analyser\Scope) { + return $scope; } return $this->resolveFromParentNodes($variable); } private function resolveFromParentNodes(\PhpParser\Node\Expr\Variable $variable) : ?\PHPStan\Analyser\Scope { - foreach (self::PARENT_NODE_ATTRIBUTES as $parentNodeAttribute) { - $parentNode = $variable->getAttribute($parentNodeAttribute); - if (!$parentNode instanceof \PhpParser\Node) { - continue; - } - $parentNodeScope = $parentNode->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); - if (!$parentNodeScope instanceof \PHPStan\Analyser\Scope) { - continue; - } - return $parentNodeScope; + $parent = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); + if (!$parent instanceof \PhpParser\Node) { + return null; } - return null; + return $parent->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); } } diff --git a/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php index 53b807c71d3..736008016db 100644 --- a/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php @@ -10,6 +10,7 @@ use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\StaticPropertyFetch; use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use Rector\Core\Rector\AbstractRector; use Rector\DeadCode\SideEffect\SideEffectNodeDetector; @@ -108,6 +109,8 @@ CODE_SAMPLE } private function areInSameClassMethod(\PhpParser\Node\Expr\Assign $assign, \PhpParser\Node\Stmt\Expression $previousExpression) : bool { - return $this->nodeComparator->areNodesEqual($assign->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE), $previousExpression->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE)); + $assignClassMethod = $this->betterNodeFinder->findParentType($assign, \PhpParser\Node\Stmt\ClassMethod::class); + $previousExpressionClassMethod = $this->betterNodeFinder->findParentType($previousExpression, \PhpParser\Node\Stmt\ClassMethod::class); + return $this->nodeComparator->areNodesEqual($assignClassMethod, $previousExpressionClassMethod); } } diff --git a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php index 6a7fd1e4d6b..0a680d55ff3 100644 --- a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php @@ -13,6 +13,7 @@ use PhpParser\Node\Expr\NullsafeMethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\FunctionLike; +use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use Rector\Core\Php\ReservedKeywordAnalyzer; @@ -118,7 +119,7 @@ CODE_SAMPLE } private function shouldSkip(\PhpParser\Node\Expr\Assign $assign) : bool { - $classMethod = $assign->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($assign, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\FunctionLike) { return \true; } diff --git a/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php b/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php index 57a0f5242c4..c3119b7e08d 100644 --- a/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php +++ b/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php @@ -90,7 +90,7 @@ CODE_SAMPLE $this->removeNode($node); return null; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return null; } diff --git a/rules/DependencyInjection/NodeAnalyzer/ControllerClassMethodAnalyzer.php b/rules/DependencyInjection/NodeAnalyzer/ControllerClassMethodAnalyzer.php index 8c8833f12fd..d58d081df43 100644 --- a/rules/DependencyInjection/NodeAnalyzer/ControllerClassMethodAnalyzer.php +++ b/rules/DependencyInjection/NodeAnalyzer/ControllerClassMethodAnalyzer.php @@ -5,9 +5,18 @@ namespace Rector\DependencyInjection\NodeAnalyzer; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\ClassMethod; +use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeTypeResolver\Node\AttributeKey; final class ControllerClassMethodAnalyzer { + /** + * @var \Rector\Core\PhpParser\Node\BetterNodeFinder + */ + private $betterNodeFinder; + public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder) + { + $this->betterNodeFinder = $betterNodeFinder; + } public function isInControllerActionMethod(\PhpParser\Node\Expr\Variable $variable) : bool { /** @var string|null $className */ @@ -18,7 +27,7 @@ final class ControllerClassMethodAnalyzer if (\substr_compare($className, 'Controller', -\strlen('Controller')) !== 0) { return \false; } - $classMethod = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($variable, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php index 4c1b363f129..b66266ee3ed 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php @@ -13,6 +13,7 @@ use PhpParser\Node\Stmt\Property; use PHPStan\Type\MixedType; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; +use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\NodeManipulator\ClassInsertManipulator; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\MethodName; @@ -184,8 +185,11 @@ CODE_SAMPLE } private function decoratePropertyWithParamDocInfo(\PhpParser\Node\Param $param, \PhpParser\Node\Stmt\Property $property) : void { - $constructor = $param->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); - $phpDocInfo = $this->phpDocInfoFactory->createFromNode($constructor); + $constructorClassMethod = $this->betterNodeFinder->findParentType($param, \PhpParser\Node\Stmt\ClassMethod::class); + if (!$constructorClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { + throw new \Rector\Core\Exception\ShouldNotHappenException(); + } + $phpDocInfo = $this->phpDocInfoFactory->createFromNode($constructorClassMethod); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { return; } diff --git a/rules/PhpSpecToPHPUnit/PhpSpecMockCollector.php b/rules/PhpSpecToPHPUnit/PhpSpecMockCollector.php index ebf8ad3c7cd..cd90a3bba72 100644 --- a/rules/PhpSpecToPHPUnit/PhpSpecMockCollector.php +++ b/rules/PhpSpecToPHPUnit/PhpSpecMockCollector.php @@ -9,6 +9,7 @@ use PhpParser\Node\Param; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use Rector\Core\Exception\ShouldNotHappenException; +use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeNameResolver\NodeNameResolver; use Rector\NodeTypeResolver\Node\AttributeKey; use RectorPrefix20211106\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser; @@ -34,10 +35,15 @@ final class PhpSpecMockCollector * @var \Rector\NodeNameResolver\NodeNameResolver */ private $nodeNameResolver; - public function __construct(\RectorPrefix20211106\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver) + /** + * @var \Rector\Core\PhpParser\Node\BetterNodeFinder + */ + private $betterNodeFinder; + public function __construct(\RectorPrefix20211106\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder) { $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; $this->nodeNameResolver = $nodeNameResolver; + $this->betterNodeFinder = $betterNodeFinder; } /** * @return mixed[] @@ -88,7 +94,7 @@ final class PhpSpecMockCollector $variable = $this->nodeNameResolver->getName($param->var); /** @var string $class */ $class = $param->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME); - $classMethod = $param->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($param, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { throw new \Rector\Core\Exception\ShouldNotHappenException(); } diff --git a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php index 00cd7681987..7481289e0d8 100644 --- a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php @@ -119,7 +119,7 @@ final class PhpSpecMocksToPHPUnitMocksRector extends \Rector\PhpSpecToPHPUnit\Re $classLike = $this->betterNodeFinder->findParentType($param, \PhpParser\Node\Stmt\Class_::class); $classMocks = $this->phpSpecMockCollector->resolveClassMocksFromParam($classLike); $variable = $this->getName($param->var); - $classMethod = $param->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($param, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { throw new \Rector\Core\Exception\ShouldNotHappenException(); } diff --git a/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php b/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php index 1bce61d696f..bfb3d91a5fe 100644 --- a/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php +++ b/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php @@ -101,7 +101,7 @@ CODE_SAMPLE return null; } foreach ($readOnlyVariableAssigns as $readOnlyVariableAssign) { - $classMethod = $readOnlyVariableAssign->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($readOnlyVariableAssign, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { throw new \Rector\Core\Exception\ShouldNotHappenException(); } diff --git a/rules/Removing/NodeManipulator/ComplexNodeRemover.php b/rules/Removing/NodeManipulator/ComplexNodeRemover.php index 0b3ac59cf80..b88639499f7 100644 --- a/rules/Removing/NodeManipulator/ComplexNodeRemover.php +++ b/rules/Removing/NodeManipulator/ComplexNodeRemover.php @@ -99,7 +99,7 @@ final class ComplexNodeRemover */ private function shouldSkipPropertyForClassMethod($expr, array $classMethodNamesToSkip) : bool { - $classMethodNode = $expr->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethodNode = $this->betterNodeFinder->findParentType($expr, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethodNode instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } @@ -122,7 +122,7 @@ final class ComplexNodeRemover } private function removeConstructorDependency(\PhpParser\Node\Expr\Assign $assign) : void { - $classMethod = $assign->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($assign, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return; } diff --git a/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php b/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php index 6e2aa20c091..d5a72fb2759 100644 --- a/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php +++ b/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php @@ -118,7 +118,7 @@ CODE_SAMPLE } private function isInStaticClassMethod(\PhpParser\Node\Expr\StaticCall $staticCall) : bool { - $locationClassMethod = $staticCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $locationClassMethod = $this->betterNodeFinder->findParentType($staticCall, \PhpParser\Node\Stmt\ClassMethod::class); if (!$locationClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } diff --git a/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php b/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php index f8a63a93f48..164e240e280 100644 --- a/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php +++ b/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php @@ -8,12 +8,12 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Type\ObjectType; use Rector\Core\Configuration\Option; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\MethodName; use Rector\Naming\Naming\PropertyNaming; -use Rector\NodeTypeResolver\Node\AttributeKey; use RectorPrefix20211106\Symplify\PackageBuilder\Parameter\ParameterProvider; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -82,7 +82,10 @@ CODE_SAMPLE return $this->createFromSelf($node); } $propertyName = $this->propertyNaming->fqnToVariableName($staticObjectType); - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); + if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { + return null; + } if ($this->nodeNameResolver->isName($classMethod, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { $propertyFetch = new \PhpParser\Node\Expr\Variable($propertyName); } else { diff --git a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php index c4ab674962e..e85ce9b2900 100644 --- a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php +++ b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php @@ -15,7 +15,6 @@ use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\Rector\AbstractRector; use Rector\Naming\Naming\PropertyNaming; use Rector\Naming\ValueObject\ExpectedName; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\NodeTypeResolver\TypeAnalyzer\ArrayTypeAnalyzer; use Rector\PostRector\Collector\PropertyToAddCollector; use Rector\PostRector\ValueObject\PropertyMetadata; @@ -143,10 +142,9 @@ CODE_SAMPLE } private function shouldSkipFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall) : bool { - // we can inject only in injectable class method context // we can inject only in injectable class method context /** @var ClassMethod|null $classMethod */ - $classMethod = $funcCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($funcCall, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \true; } diff --git a/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php b/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php index 5458f60d141..259e0c91a85 100644 --- a/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php +++ b/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php @@ -9,7 +9,6 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; use Rector\Core\Rector\AbstractRector; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Transform\NodeAnalyzer\FuncCallStaticCallToMethodCallAnalyzer; use Rector\Transform\ValueObject\FuncCallToMethodCall; use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample; @@ -84,7 +83,7 @@ CODE_SAMPLE if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { return null; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return null; } diff --git a/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php b/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php index 0dc72e6a8c4..ecc7d4f7389 100644 --- a/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php +++ b/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php @@ -13,7 +13,6 @@ use PhpParser\Node\Stmt\ClassMethod; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\Rector\AbstractRector; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Transform\NodeAnalyzer\FuncCallStaticCallToMethodCallAnalyzer; use Rector\Transform\ValueObject\StaticCallToMethodCall; use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample; @@ -93,7 +92,7 @@ CODE_SAMPLE if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { return null; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return null; } diff --git a/rules/TypeDeclaration/TypeInferer/ParamTypeInferer/GetterNodeParamTypeInferer.php b/rules/TypeDeclaration/TypeInferer/ParamTypeInferer/GetterNodeParamTypeInferer.php index d89d8857f54..a55b6d75619 100644 --- a/rules/TypeDeclaration/TypeInferer/ParamTypeInferer/GetterNodeParamTypeInferer.php +++ b/rules/TypeDeclaration/TypeInferer/ParamTypeInferer/GetterNodeParamTypeInferer.php @@ -85,7 +85,7 @@ final class GetterNodeParamTypeInferer implements \Rector\TypeDeclaration\Contra return null; } // what is return type? - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 7f9ccc42821..07ddc0c65e1 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = 'c3b6efea7ee5351ce66461fe02c5f9b7282816bb'; + public const PACKAGE_VERSION = '824df97e93bb43baca8f22a6f6a0f537a0049dd6'; /** * @var string */ - public const RELEASE_DATE = '2021-11-06 12:52:18'; + public const RELEASE_DATE = '2021-11-06 15:07:22'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20211106\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/src/NodeManipulator/ClassMethodManipulator.php b/src/NodeManipulator/ClassMethodManipulator.php index deb2950ebe2..694f71c0f6c 100644 --- a/src/NodeManipulator/ClassMethodManipulator.php +++ b/src/NodeManipulator/ClassMethodManipulator.php @@ -116,12 +116,12 @@ final class ClassMethodManipulator */ public function addMethodParameterIfMissing(\PhpParser\Node $node, \PHPStan\Type\ObjectType $objectType, array $possibleNames) : string { - $classMethodNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); - if (!$classMethodNode instanceof \PhpParser\Node\Stmt\ClassMethod) { + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); + if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { // or null? throw new \Rector\Core\Exception\ShouldNotHappenException(); } - foreach ($classMethodNode->params as $paramNode) { + foreach ($classMethod->params as $paramNode) { if (!$this->nodeTypeResolver->isObjectType($paramNode, $objectType)) { continue; } @@ -131,8 +131,8 @@ final class ClassMethodManipulator } return $paramName; } - $paramName = $this->resolveName($classMethodNode, $possibleNames); - $classMethodNode->params[] = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable($paramName), null, new \PhpParser\Node\Name\FullyQualified($objectType->getClassName())); + $paramName = $this->resolveName($classMethod, $possibleNames); + $classMethod->params[] = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable($paramName), null, new \PhpParser\Node\Name\FullyQualified($objectType->getClassName())); return $paramName; } public function isPropertyPromotion(\PhpParser\Node\Stmt\ClassMethod $classMethod) : bool diff --git a/src/NodeManipulator/MethodCallManipulator.php b/src/NodeManipulator/MethodCallManipulator.php index 0e0f1999218..90722ba5cca 100644 --- a/src/NodeManipulator/MethodCallManipulator.php +++ b/src/NodeManipulator/MethodCallManipulator.php @@ -95,7 +95,7 @@ final class MethodCallManipulator public function findMethodCallsOnVariable(\PhpParser\Node\Expr\Variable $variable) : array { // get scope node, e.g. parent function call, method call or anonymous function - $classMethod = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($variable, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return []; } diff --git a/src/NodeManipulator/PropertyManipulator.php b/src/NodeManipulator/PropertyManipulator.php index e58c2e6a26d..3184d3e3d58 100644 --- a/src/NodeManipulator/PropertyManipulator.php +++ b/src/NodeManipulator/PropertyManipulator.php @@ -125,7 +125,7 @@ final class PropertyManipulator return \true; } // skip for constructor? it is allowed to set value in constructor method - $classMethod = $propertyFetch->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($propertyFetch, \PhpParser\Node\Stmt\ClassMethod::class); if ($classMethod instanceof \PhpParser\Node\Stmt\ClassMethod && $this->nodeNameResolver->isName($classMethod->name, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { continue; } diff --git a/src/Php/Regex/RegexPatternArgumentManipulator.php b/src/Php/Regex/RegexPatternArgumentManipulator.php index 123b07d6e9c..508a0a438ec 100644 --- a/src/Php/Regex/RegexPatternArgumentManipulator.php +++ b/src/Php/Regex/RegexPatternArgumentManipulator.php @@ -20,7 +20,6 @@ use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\Core\PhpParser\NodeFinder\LocalConstantFinder; use Rector\NodeNameResolver\NodeNameResolver; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\NodeTypeResolver\NodeTypeResolver; final class RegexPatternArgumentManipulator { @@ -144,7 +143,7 @@ final class RegexPatternArgumentManipulator */ private function findAssignerForVariable(\PhpParser\Node\Expr\Variable $variable) : array { - $classMethod = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($variable, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return []; } diff --git a/src/Rector/AbstractRector.php b/src/Rector/AbstractRector.php index 374ba8abec8..0f74e34b098 100644 --- a/src/Rector/AbstractRector.php +++ b/src/Rector/AbstractRector.php @@ -59,7 +59,7 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements /** * @var string[] */ - private const ATTRIBUTES_TO_MIRROR = [\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME, \Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE, \Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES, \Rector\NodeTypeResolver\Node\AttributeKey::SCOPE, \Rector\NodeTypeResolver\Node\AttributeKey::RESOLVED_NAME, \Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE, \Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT, \Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_STATEMENT]; + private const ATTRIBUTES_TO_MIRROR = [\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME, \Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES, \Rector\NodeTypeResolver\Node\AttributeKey::SCOPE, \Rector\NodeTypeResolver\Node\AttributeKey::RESOLVED_NAME, \Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE, \Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT, \Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_STATEMENT]; /** * @var \Rector\NodeNameResolver\NodeNameResolver */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 5e67dba08b2..7be54b0bdbd 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb::getLoader(); +return ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 14c3142819c..9527c996bed 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb +class ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit459af300f88369828b2c5381ea17dddb::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit459af300f88369828b2c5381ea17dddb::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire459af300f88369828b2c5381ea17dddb($fileIdentifier, $file); + composerRequire7ade9639c4b2634a59b028a99a4c8a81($fileIdentifier, $file); } return $loader; } } -function composerRequire459af300f88369828b2c5381ea17dddb($fileIdentifier, $file) +function composerRequire7ade9639c4b2634a59b028a99a4c8a81($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 420d3b63b82..f60bd164239 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit459af300f88369828b2c5381ea17dddb +class ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -3523,9 +3523,9 @@ class ComposerStaticInit459af300f88369828b2c5381ea17dddb public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit459af300f88369828b2c5381ea17dddb::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit459af300f88369828b2c5381ea17dddb::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit459af300f88369828b2c5381ea17dddb::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit7ade9639c4b2634a59b028a99a4c8a81::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index ae45e630c51..ddeef5aabad 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1462,17 +1462,17 @@ }, { "name": "rector\/rector-nette", - "version": "0.11.46", - "version_normalized": "0.11.46.0", + "version": "0.11.47", + "version_normalized": "0.11.47.0", "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-nette.git", - "reference": "e6406acab409e80b1258b0c292cdbf2a3a79365f" + "reference": "eddbf4ee25207951034e1b9b05378677afae22df" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-nette\/zipball\/e6406acab409e80b1258b0c292cdbf2a3a79365f", - "reference": "e6406acab409e80b1258b0c292cdbf2a3a79365f", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-nette\/zipball\/eddbf4ee25207951034e1b9b05378677afae22df", + "reference": "eddbf4ee25207951034e1b9b05378677afae22df", "shasum": "" }, "require": { @@ -1500,7 +1500,7 @@ "symplify\/phpstan-rules": "^10.0", "symplify\/rule-doc-generator": "^10.0" }, - "time": "2021-11-06T01:21:50+00:00", + "time": "2021-11-06T12:07:17+00:00", "type": "rector-extension", "extra": { "branch-alias": { @@ -1528,7 +1528,7 @@ "description": "Rector upgrades rules for Nette Framework", "support": { "issues": "https:\/\/github.com\/rectorphp\/rector-nette\/issues", - "source": "https:\/\/github.com\/rectorphp\/rector-nette\/tree\/0.11.46" + "source": "https:\/\/github.com\/rectorphp\/rector-nette\/tree\/0.11.47" }, "install-path": "..\/rector\/rector-nette" }, @@ -1657,17 +1657,17 @@ }, { "name": "rector\/rector-symfony", - "version": "0.11.37", - "version_normalized": "0.11.37.0", + "version": "0.11.38", + "version_normalized": "0.11.38.0", "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-symfony.git", - "reference": "acfb0e9ac4752910dd50a2806be2253c4dd87925" + "reference": "46437972a8bd80834e263b6b325defffd5c5ebf3" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/acfb0e9ac4752910dd50a2806be2253c4dd87925", - "reference": "acfb0e9ac4752910dd50a2806be2253c4dd87925", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/46437972a8bd80834e263b6b325defffd5c5ebf3", + "reference": "46437972a8bd80834e263b6b325defffd5c5ebf3", "shasum": "" }, "require": { @@ -1692,7 +1692,7 @@ "symplify\/phpstan-rules": "^10.0", "symplify\/rule-doc-generator": "^10.0" }, - "time": "2021-11-06T01:15:43+00:00", + "time": "2021-11-06T11:56:49+00:00", "type": "rector-extension", "extra": { "branch-alias": { @@ -1717,7 +1717,7 @@ "description": "Rector upgrades rules for Symfony Framework", "support": { "issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues", - "source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.37" + "source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.38" }, "install-path": "..\/rector\/rector-symfony" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d2f1581f72e..4a97d2f44e3 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix20211106; -return array('root' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('composer/semver' => array('pretty_version' => '3.2.6', 'version' => '3.2.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'reference' => '83e511e247de329283478496f7a1e114c9517506', 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'reference' => '84674dd3a7575ba617f5a76d7e9e29a7d3891339', 'dev_requirement' => \false), 'danielstjules/stringy' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../danielstjules/stringy', 'aliases' => array(), 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', 'dev_requirement' => \false), 'ergebnis/json-printer' => array('pretty_version' => '3.1.1', 'version' => '3.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ergebnis/json-printer', 'aliases' => array(), 'reference' => 'e4190dadd9937a77d8afcaf2b6c42a528ab367d6', 'dev_requirement' => \false), 'helmich/typo3-typoscript-parser' => array('pretty_version' => 'v2.3.1', 'version' => '2.3.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../helmich/typo3-typoscript-parser', 'aliases' => array(), 'reference' => '366c38db68a83503ba4148cd77d77e08deae084e', 'dev_requirement' => \false), 'idiosyncratic/editorconfig' => array('pretty_version' => '0.1.3', 'version' => '0.1.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../idiosyncratic/editorconfig', 'aliases' => array(), 'reference' => '3445fa4a1e00f95630d4edc729c2effb116db19b', 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.3', 'version' => '1.8.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'reference' => 'b942d263c641ddb5190929ff840c68f78713e937', 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => '33d262a0c4fb6c6371385f6dc8532f4e32c20ebc', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.13.0', 'version' => '4.13.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '50953a2691a922aa1769461637869a0a2faa3f53', 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'reference' => 'dbc093d7af60eff5cd575d2ed761b15ed40bd08e', 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'e9e2a501102ba0b126b2f63a7f0a3b151056fe91', 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'reference' => '9eb88c9f689003a8a2a5ae9e010338ee94dc39b3', 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'rector/extension-installer' => array('pretty_version' => '0.11.1', 'version' => '0.11.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'reference' => '527fcbd19f7aeb79a6fd043e1edfeab7831b59af', 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.11.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(), 'reference' => 'f26f66a9e1edfb98e16f0bf431a95b4e54fa1432', 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => '0.11.31', 'version' => '0.11.31.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => '737b54709bd173c38721ef341e2b4aad9b5b9f42', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.11', 'version' => '0.11.11.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => '63bb1e3916fb3539413f531aa32bab69146dd685', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.46', 'version' => '0.11.46.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => 'e6406acab409e80b1258b0c292cdbf2a3a79365f', 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(), 'reference' => 'e3b5ebd4302cca4134c17b38f3339953d6dcf660', 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => '0.11.21', 'version' => '0.11.21.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => 'b7033b9e4c8c5bed0ae82f828a41fc59ca5d4774', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.37', 'version' => '0.11.37.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => 'acfb0e9ac4752910dd50a2806be2253c4dd87925', 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'dev_requirement' => \false), 'ssch/typo3-rector' => array('pretty_version' => 'v0.11.30', 'version' => '0.11.30.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'b377f674165ddb29fbada8d3f4740438566d63dd', 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/config' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => 'ac23c2f24d5634966d665d836c3933d54347e5d4', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => 'd4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3', 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'reference' => '8434102b404d119dcaf98c8fe19a2655573ac17a', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => 'be833dd336c248ef2bdabf24665351455f52afdb', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/filesystem' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'reference' => '343f4fe324383ca46792cae728a3b6e2f708fb32', 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'reference' => 'a10000ada1e600d109a6c7632e9ac42e8bf2fb93', 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'dev_requirement' => \false), 'symfony/polyfill-intl-grapheme' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', 'dev_requirement' => \false), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'reference' => 'e66119f3de95efc359483f810c4c3e6436279436', 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => '38f26c7d6ed535217ea393e05634cb0b244a1967', 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'symfony/string' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'reference' => 'd70c35bb20bbca71fc4ab7921e3c6bda1a82a60c', 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.8', 'version' => '5.3.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => 'a7604de14bcf472fe8e33f758e9e5b7bf07d3b91', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.6', 'version' => '5.3.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => '300e6d0a509138cdb3cc83f70db7639033400842', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '66f26e17f5138e060935131a1053cb62001f64dd', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => 'd012c4628a917d59ccaff0acb0d92c8292aee605', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => 'f27407c2a5db049f99bd24afd16e3482dbfe888f', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => '9a3b28d393bdf81ca7da4a22f2a2aa66ed54804a', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'reference' => '197791c2d719e4b961548465651d2fe4f99f4cd1', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => '7b92ea88992ef26317ba4fc0b64900cf8e46d3a1', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => '730fb699e35964dc892b586d1f563e3be603ee7b', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '05ecf643cc3a4a04180acc761604726731a40f98', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => '48cab4a5d8ee7d8ccf19f2261060012c4e344cd1', 'dev_requirement' => \false), 'symplify/symfony-php-config' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symfony-php-config', 'aliases' => array(0 => '10.0.x-dev'), 'reference' => '68a275f6e2816a389f29c7064e9e027e09775194', 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => 'f923d94b348efea8e5cac4acc0de09a397e6b4ed', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.7', 'version' => '2.8.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '8e708de7c611f626c8792d43f1c78812ea24e6f6', 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.10.0', 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', 'dev_requirement' => \false))); +return array('root' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('composer/semver' => array('pretty_version' => '3.2.6', 'version' => '3.2.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'reference' => '83e511e247de329283478496f7a1e114c9517506', 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'reference' => '84674dd3a7575ba617f5a76d7e9e29a7d3891339', 'dev_requirement' => \false), 'danielstjules/stringy' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../danielstjules/stringy', 'aliases' => array(), 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', 'dev_requirement' => \false), 'ergebnis/json-printer' => array('pretty_version' => '3.1.1', 'version' => '3.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ergebnis/json-printer', 'aliases' => array(), 'reference' => 'e4190dadd9937a77d8afcaf2b6c42a528ab367d6', 'dev_requirement' => \false), 'helmich/typo3-typoscript-parser' => array('pretty_version' => 'v2.3.1', 'version' => '2.3.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../helmich/typo3-typoscript-parser', 'aliases' => array(), 'reference' => '366c38db68a83503ba4148cd77d77e08deae084e', 'dev_requirement' => \false), 'idiosyncratic/editorconfig' => array('pretty_version' => '0.1.3', 'version' => '0.1.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../idiosyncratic/editorconfig', 'aliases' => array(), 'reference' => '3445fa4a1e00f95630d4edc729c2effb116db19b', 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.3', 'version' => '1.8.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'reference' => 'b942d263c641ddb5190929ff840c68f78713e937', 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => '33d262a0c4fb6c6371385f6dc8532f4e32c20ebc', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.13.0', 'version' => '4.13.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '50953a2691a922aa1769461637869a0a2faa3f53', 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'reference' => 'dbc093d7af60eff5cd575d2ed761b15ed40bd08e', 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'e9e2a501102ba0b126b2f63a7f0a3b151056fe91', 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'reference' => '9eb88c9f689003a8a2a5ae9e010338ee94dc39b3', 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'rector/extension-installer' => array('pretty_version' => '0.11.1', 'version' => '0.11.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'reference' => '527fcbd19f7aeb79a6fd043e1edfeab7831b59af', 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.11.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(), 'reference' => 'f26f66a9e1edfb98e16f0bf431a95b4e54fa1432', 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => '0.11.31', 'version' => '0.11.31.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => '737b54709bd173c38721ef341e2b4aad9b5b9f42', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.11', 'version' => '0.11.11.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => '63bb1e3916fb3539413f531aa32bab69146dd685', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.47', 'version' => '0.11.47.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => 'eddbf4ee25207951034e1b9b05378677afae22df', 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(), 'reference' => 'e3b5ebd4302cca4134c17b38f3339953d6dcf660', 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => '0.11.21', 'version' => '0.11.21.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => 'b7033b9e4c8c5bed0ae82f828a41fc59ca5d4774', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.38', 'version' => '0.11.38.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => '46437972a8bd80834e263b6b325defffd5c5ebf3', 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'dev_requirement' => \false), 'ssch/typo3-rector' => array('pretty_version' => 'v0.11.30', 'version' => '0.11.30.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'b377f674165ddb29fbada8d3f4740438566d63dd', 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/config' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => 'ac23c2f24d5634966d665d836c3933d54347e5d4', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => 'd4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3', 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'reference' => '8434102b404d119dcaf98c8fe19a2655573ac17a', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => 'be833dd336c248ef2bdabf24665351455f52afdb', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/filesystem' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'reference' => '343f4fe324383ca46792cae728a3b6e2f708fb32', 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'reference' => 'a10000ada1e600d109a6c7632e9ac42e8bf2fb93', 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'dev_requirement' => \false), 'symfony/polyfill-intl-grapheme' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', 'dev_requirement' => \false), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'reference' => 'e66119f3de95efc359483f810c4c3e6436279436', 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => '38f26c7d6ed535217ea393e05634cb0b244a1967', 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'symfony/string' => array('pretty_version' => 'v5.3.10', 'version' => '5.3.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'reference' => 'd70c35bb20bbca71fc4ab7921e3c6bda1a82a60c', 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.4.0')), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.8', 'version' => '5.3.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => 'a7604de14bcf472fe8e33f758e9e5b7bf07d3b91', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.6', 'version' => '5.3.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => '300e6d0a509138cdb3cc83f70db7639033400842', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '66f26e17f5138e060935131a1053cb62001f64dd', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => 'd012c4628a917d59ccaff0acb0d92c8292aee605', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => 'f27407c2a5db049f99bd24afd16e3482dbfe888f', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => '9a3b28d393bdf81ca7da4a22f2a2aa66ed54804a', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'reference' => '197791c2d719e4b961548465651d2fe4f99f4cd1', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => '7b92ea88992ef26317ba4fc0b64900cf8e46d3a1', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => '730fb699e35964dc892b586d1f563e3be603ee7b', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '05ecf643cc3a4a04180acc761604726731a40f98', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => '48cab4a5d8ee7d8ccf19f2261060012c4e344cd1', 'dev_requirement' => \false), 'symplify/symfony-php-config' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symfony-php-config', 'aliases' => array(0 => '10.0.x-dev'), 'reference' => '68a275f6e2816a389f29c7064e9e027e09775194', 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '10.0.0-beta2', 'version' => '10.0.0.0-beta2', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => 'f923d94b348efea8e5cac4acc0de09a397e6b4ed', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.7', 'version' => '2.8.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '8e708de7c611f626c8792d43f1c78812ea24e6f6', 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.10.0', 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', 'dev_requirement' => \false))); diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index e94f40b5845..f8b10d74e96 100644 --- a/vendor/rector/extension-installer/src/GeneratedConfig.php +++ b/vendor/rector/extension-installer/src/GeneratedConfig.php @@ -9,7 +9,7 @@ namespace Rector\RectorInstaller; */ final class GeneratedConfig { - public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.31'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.11'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.46'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.21'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.37'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.30')); + public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.31'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.11'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.47'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.21'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.38'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.30')); private function __construct() { } diff --git a/vendor/rector/rector-nette/src/FormControlTypeResolver/ThisVariableInAnotherMethodFormControlTypeResolver.php b/vendor/rector/rector-nette/src/FormControlTypeResolver/ThisVariableInAnotherMethodFormControlTypeResolver.php index 705eb123697..ae11eb23e19 100644 --- a/vendor/rector/rector-nette/src/FormControlTypeResolver/ThisVariableInAnotherMethodFormControlTypeResolver.php +++ b/vendor/rector/rector-nette/src/FormControlTypeResolver/ThisVariableInAnotherMethodFormControlTypeResolver.php @@ -12,7 +12,6 @@ use Rector\Core\ValueObject\MethodName; use Rector\Nette\Contract\FormControlTypeResolverInterface; use Rector\Nette\NodeResolver\MethodNamesByInputNamesResolver; use Rector\NodeNameResolver\NodeNameResolver; -use Rector\NodeTypeResolver\Node\AttributeKey; use RectorPrefix20211106\Symfony\Contracts\Service\Attribute\Required; final class ThisVariableInAnotherMethodFormControlTypeResolver implements \Rector\Nette\Contract\FormControlTypeResolverInterface { @@ -49,7 +48,7 @@ final class ThisVariableInAnotherMethodFormControlTypeResolver implements \Recto if (!$node instanceof \PhpParser\Node\Expr\Variable) { return []; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return []; } diff --git a/vendor/rector/rector-nette/src/NodeAnalyzer/AssignAnalyzer.php b/vendor/rector/rector-nette/src/NodeAnalyzer/AssignAnalyzer.php index ca69e2e0006..9cd3f7a02b9 100644 --- a/vendor/rector/rector-nette/src/NodeAnalyzer/AssignAnalyzer.php +++ b/vendor/rector/rector-nette/src/NodeAnalyzer/AssignAnalyzer.php @@ -10,6 +10,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use PHPStan\Type\ObjectType; use Rector\BetterPhpDocParser\PhpDocManipulator\VarAnnotationManipulator; +use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\Nette\NodeAdding\FunctionLikeFirstLevelStatementResolver; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PostRector\Collector\NodesToAddCollector; @@ -31,11 +32,16 @@ final class AssignAnalyzer * @var \Rector\BetterPhpDocParser\PhpDocManipulator\VarAnnotationManipulator */ private $varAnnotationManipulator; - public function __construct(\Rector\Nette\NodeAdding\FunctionLikeFirstLevelStatementResolver $functionLikeFirstLevelStatementResolver, \Rector\PostRector\Collector\NodesToAddCollector $nodesToAddCollector, \Rector\BetterPhpDocParser\PhpDocManipulator\VarAnnotationManipulator $varAnnotationManipulator) + /** + * @var \Rector\Core\PhpParser\Node\BetterNodeFinder + */ + private $betterNodeFinder; + public function __construct(\Rector\Nette\NodeAdding\FunctionLikeFirstLevelStatementResolver $functionLikeFirstLevelStatementResolver, \Rector\PostRector\Collector\NodesToAddCollector $nodesToAddCollector, \Rector\BetterPhpDocParser\PhpDocManipulator\VarAnnotationManipulator $varAnnotationManipulator, \Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder) { $this->functionLikeFirstLevelStatementResolver = $functionLikeFirstLevelStatementResolver; $this->nodesToAddCollector = $nodesToAddCollector; $this->varAnnotationManipulator = $varAnnotationManipulator; + $this->betterNodeFinder = $betterNodeFinder; } public function addAssignExpressionForFirstCase(string $variableName, \PhpParser\Node\Expr\ArrayDimFetch $arrayDimFetch, \PHPStan\Type\ObjectType $controlObjectType) : void { @@ -48,7 +54,7 @@ final class AssignAnalyzer } private function shouldSkipForAlreadyAddedInCurrentClassMethod(\PhpParser\Node\Expr\ArrayDimFetch $arrayDimFetch, string $variableName) : bool { - $classMethod = $arrayDimFetch->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($arrayDimFetch, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } diff --git a/vendor/rector/rector-nette/src/NodeAnalyzer/MethodCallManipulator.php b/vendor/rector/rector-nette/src/NodeAnalyzer/MethodCallManipulator.php index 0ce07751e20..9da98a285b5 100644 --- a/vendor/rector/rector-nette/src/NodeAnalyzer/MethodCallManipulator.php +++ b/vendor/rector/rector-nette/src/NodeAnalyzer/MethodCallManipulator.php @@ -95,7 +95,7 @@ final class MethodCallManipulator public function findMethodCallsOnVariable(\PhpParser\Node\Expr\Variable $variable) : array { // get scope node, e.g. parent function call, method call or anonymous function - $classMethod = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($variable, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return []; } diff --git a/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php b/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php index 0b188ed34ca..852f2174e55 100644 --- a/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php +++ b/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php @@ -129,7 +129,7 @@ CODE_SAMPLE return null; } $this->assignAnalyzer->addAssignExpressionForFirstCase($variableName, $node, $controlObjectType); - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if ($classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { $this->arrayDimFetchRenamer->renameToVariable($classMethod, $node, $variableName); } diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php index 77bf262e266..3f744f3a62a 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php @@ -12,7 +12,6 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\ClassMethod; use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\Rector\AbstractRector; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -143,7 +142,7 @@ CODE_SAMPLE if (!$this->isName($node->name, 'getRequest') && !$this->isGetMethodCallWithRequestParameters($node)) { return \false; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } diff --git a/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php b/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php index 683e83e887f..34a3c28e0b9 100644 --- a/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php @@ -93,7 +93,7 @@ CODE_SAMPLE if (!$classReflection->isSubclassOf('Twig_Extension')) { return null; } - $classMethod = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE); + $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return null; } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index 31a76e1835c..5c86882e918 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20211106\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb', false) && !interface_exists('ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb', false) && !trait_exists('ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb', false)) { - spl_autoload_call('RectorPrefix20211106\ComposerAutoloaderInit459af300f88369828b2c5381ea17dddb'); +if (!class_exists('ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81', false) && !interface_exists('ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81', false) && !trait_exists('ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81', false)) { + spl_autoload_call('RectorPrefix20211106\ComposerAutoloaderInit7ade9639c4b2634a59b028a99a4c8a81'); } if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { spl_autoload_call('RectorPrefix20211106\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20211106\print_node(...func_get_args()); } } -if (!function_exists('composerRequire459af300f88369828b2c5381ea17dddb')) { - function composerRequire459af300f88369828b2c5381ea17dddb() { - return \RectorPrefix20211106\composerRequire459af300f88369828b2c5381ea17dddb(...func_get_args()); +if (!function_exists('composerRequire7ade9639c4b2634a59b028a99a4c8a81')) { + function composerRequire7ade9639c4b2634a59b028a99a4c8a81() { + return \RectorPrefix20211106\composerRequire7ade9639c4b2634a59b028a99a4c8a81(...func_get_args()); } } if (!function_exists('parseArgs')) {