diff --git a/rules/Removing/NodeManipulator/ComplexNodeRemover.php b/rules/Removing/NodeManipulator/ComplexNodeRemover.php index d44161920cc..b560ec16d8a 100644 --- a/rules/Removing/NodeManipulator/ComplexNodeRemover.php +++ b/rules/Removing/NodeManipulator/ComplexNodeRemover.php @@ -7,6 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\StaticPropertyFetch; +use PhpParser\Node\Expr\Variable; use PhpParser\Node\Param; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassLike; @@ -154,6 +155,8 @@ final class ComplexNodeRemover } $params = $constructClassMethod->getParams(); $paramKeysToBeRemoved = []; + /** @var Variable[] $variables */ + $variables = $this->resolveVariables($constructClassMethod); foreach ($params as $key => $param) { $variable = $this->betterNodeFinder->findFirst((array) $constructClassMethod->stmts, function (\PhpParser\Node $node) use($param) : bool { return $this->nodeComparator->areNodesEqual($param->var, $node); @@ -167,10 +170,37 @@ final class ComplexNodeRemover if (!$this->nodeComparator->areNodesEqual($param->var, $assign->expr)) { continue; } + if ($this->isInVariables($variables, $assign)) { + continue; + } $paramKeysToBeRemoved[] = $key; } $this->processRemoveParamWithKeys($params, $paramKeysToBeRemoved); } + /** + * @return Variable[] + */ + private function resolveVariables(\PhpParser\Node\Stmt\ClassMethod $classMethod) : array + { + return $this->betterNodeFinder->find((array) $classMethod->stmts, function (\PhpParser\Node $subNode) : bool { + if (!$subNode instanceof \PhpParser\Node\Expr\Variable) { + return \false; + } + return $this->isExpressionVariableNotAssign($subNode); + }); + } + /** + * @param Variable[] $variables + */ + private function isInVariables(array $variables, \PhpParser\Node\Expr\Assign $assign) : bool + { + foreach ($variables as $variable) { + if ($this->nodeComparator->areNodesEqual($assign->expr, $variable)) { + return \true; + } + } + return \false; + } /** * @param Param[] $params * @param int[] $paramKeysToBeRemoved diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 1556fc4f8a3..7d437fc767f 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = '4ad4d16ac63bd20127e23389c40e5cf7296c41ea'; + public const PACKAGE_VERSION = '50bbdd1e934f3ae6cc808debf5059bf48bd8d3e2'; /** * @var string */ - public const RELEASE_DATE = '2021-11-28 23:53:11'; + public const RELEASE_DATE = '2021-11-29 09:30:00'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20211129\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/vendor/autoload.php b/vendor/autoload.php index 870627da9d9..313eed80d26 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6::getLoader(); +return ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 0b45e2073a1..b8f0a326cbf 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2886,6 +2886,7 @@ return array( 'Rector\\Symfony\\Set\\TwigSetList' => $vendorDir . '/rector/rector-symfony/src/Set/TwigSetList.php', 'Rector\\Symfony\\TypeAnalyzer\\ArrayUnionResponseTypeAnalyzer' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/ArrayUnionResponseTypeAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\ContainerAwareAnalyzer' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/ContainerAwareAnalyzer.php', + 'Rector\\Symfony\\TypeAnalyzer\\ControllerAnalyzer' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/ControllerAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\JMSDITypeResolver' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php', 'Rector\\Symfony\\TypeDeclaration\\ReturnTypeDeclarationUpdater' => $vendorDir . '/rector/rector-symfony/src/TypeDeclaration/ReturnTypeDeclarationUpdater.php', 'Rector\\Symfony\\ValueObjectFactory\\ServiceMapFactory' => $vendorDir . '/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index a89c1318ace..5d0effdaee6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6 +class ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5', '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\ComposerStaticInitffe715fe221b8fc7fa75381e210607f6::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitffe715fe221b8fc7fa75381e210607f6::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireffe715fe221b8fc7fa75381e210607f6($fileIdentifier, $file); + composerRequire9a0804c2fa2b16f124e30b25ead868d5($fileIdentifier, $file); } return $loader; } } -function composerRequireffe715fe221b8fc7fa75381e210607f6($fileIdentifier, $file) +function composerRequire9a0804c2fa2b16f124e30b25ead868d5($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 71eb4d801f1..385e7cbe256 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitffe715fe221b8fc7fa75381e210607f6 +class ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -3283,6 +3283,7 @@ class ComposerStaticInitffe715fe221b8fc7fa75381e210607f6 'Rector\\Symfony\\Set\\TwigSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/TwigSetList.php', 'Rector\\Symfony\\TypeAnalyzer\\ArrayUnionResponseTypeAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/ArrayUnionResponseTypeAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\ContainerAwareAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/ContainerAwareAnalyzer.php', + 'Rector\\Symfony\\TypeAnalyzer\\ControllerAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/ControllerAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\JMSDITypeResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php', 'Rector\\Symfony\\TypeDeclaration\\ReturnTypeDeclarationUpdater' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeDeclaration/ReturnTypeDeclarationUpdater.php', 'Rector\\Symfony\\ValueObjectFactory\\ServiceMapFactory' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php', @@ -3770,9 +3771,9 @@ class ComposerStaticInitffe715fe221b8fc7fa75381e210607f6 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitffe715fe221b8fc7fa75381e210607f6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitffe715fe221b8fc7fa75381e210607f6::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitffe715fe221b8fc7fa75381e210607f6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit9a0804c2fa2b16f124e30b25ead868d5::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0036ac19117..afbeb9972a2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2468,17 +2468,17 @@ }, { "name": "rector\/rector-symfony", - "version": "0.11.42", - "version_normalized": "0.11.42.0", + "version": "0.11.43", + "version_normalized": "0.11.43.0", "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-symfony.git", - "reference": "0c9c7fccf62f4150ceb94f9c344322cdd6bac62a" + "reference": "cb0a0d27190878e63d4851d257e1d97f0b78cae1" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/0c9c7fccf62f4150ceb94f9c344322cdd6bac62a", - "reference": "0c9c7fccf62f4150ceb94f9c344322cdd6bac62a", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/cb0a0d27190878e63d4851d257e1d97f0b78cae1", + "reference": "cb0a0d27190878e63d4851d257e1d97f0b78cae1", "shasum": "" }, "require": { @@ -2492,6 +2492,8 @@ "require-dev": { "phpstan\/extension-installer": "^1.1", "phpstan\/phpstan": "^1.1", + "phpstan\/phpstan-strict-rules": "^1.1", + "phpstan\/phpstan-webmozart-assert": "^1.0", "phpunit\/phpunit": "^9.5", "rector\/phpstan-rules": "^0.4.4", "rector\/rector-src": "dev-main", @@ -2503,7 +2505,7 @@ "symplify\/phpstan-rules": "^10.0", "symplify\/rule-doc-generator": "^10.0" }, - "time": "2021-11-23T11:15:50+00:00", + "time": "2021-11-29T00:04:04+00:00", "type": "rector-extension", "extra": { "branch-alias": { @@ -2528,7 +2530,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.42" + "source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.43" }, "install-path": "..\/rector\/rector-symfony" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 42b2b7fe95f..fc0153e1ccf 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix20211129; -return array('root' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.12.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'dev_requirement' => \false), '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), 'cweagans/composer-patches' => array('pretty_version' => '1.7.1', 'version' => '1.7.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../cweagans/composer-patches', 'aliases' => array(), 'reference' => '9888dcc74993c030b75f3dd548bb5e20cdbd740c', '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), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', '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.2', 'version' => '3.3.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => '54b287d8c2cdbe577b02e28ca1713e275b05ece2', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.6', 'version' => '3.2.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '2f261e55bd6a12057442045bf2c249806abc1d02', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.13.1', 'version' => '4.13.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '63a79e8daa781cac14e5195e63ed8ae231dd10fd', '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.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'cbe085f9fdead5b6d62e4c022ca52dc9427a10ee', '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')), 'react/cache' => array('pretty_version' => 'v1.1.1', 'version' => '1.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.4', 'version' => '0.6.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'reference' => 'a778f3fb828d68caf8a9ab6567fd8342a86f12fe', 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.8.0', 'version' => '1.8.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'reference' => '2a5a74ab751e53863b45fb87e1d3913884f88248', 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'reference' => 'be6dee480fc4692cec0504e65eb486e3be1aa6f2', 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.8.0', 'version' => '2.8.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'reference' => 'f3cff96a19736714524ca0dd1d4130de73dbbbc4', 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.7.0', 'version' => '1.7.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'reference' => '607dd79990e32fcb402cb0a176b4a4be12f97e7c', 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'reference' => 'aa6e3f8ebcd6dec3ad1ee92a449b4cc341994001', 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'dev_requirement' => \false), '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.12.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.40', 'version' => '0.11.40.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => 'bc7998f8511f4c3a401e97c0baa075495397acc8', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.13', 'version' => '0.11.13.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => 'aabe2ef9f13d2bcb79cf423e2f5ffe1a6ab382ff', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.54', 'version' => '0.11.54.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => '0b165f270ec8f73b277ba988bb51b70f8a99a01e', '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.23', 'version' => '0.11.23.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => '8e8c285cdc8937012ef27e785b0d94d4f4591327', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.12.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.42', 'version' => '0.11.42.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => '0c9c7fccf62f4150ceb94f9c344322cdd6bac62a', '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.31', 'version' => '0.11.31.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'ce3e55ebce3e70efb5d984d4f5951e2263440856', 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.0')), 'symfony/config' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => 'f080af00c441f1df40cf5c269707fdebe5740557', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => '3e7ab8f5905058984899b05a4648096f558bfeba', 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v2.5.0', 'version' => '2.5.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'reference' => '1f4c95d47bddf0c1579779d4b85602c923ed2f1c', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => '3793617321eb39b2e8e708f6fd61f875ec5f0ed6', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.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.5.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.12', 'version' => '5.3.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => 'e498803a6e95ede78e9d5646ad32a2255c033a6a', 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.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.5.0')), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => 'b16fcf355b810bcbccc2c6eac1d016725dbf9002', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '226638aa877bc4104e619a15f27d8141cd6b4e4a', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => 'a486d6c758ba0e55d7d937aceadd0dc432c78dfc', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '3acbdc9f59fa62d01bfa87cc8dd6129a95e80e63', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => 'f336cdda76683531a586cdeb427852be3eca3891', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => 'eea4bba3ec914c845276f3f6c76a207127afc76d', 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'reference' => 'e4136bfe13508281ec285738ddd22b8a85dc0f4d', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => '1aeedea3b121e97384cddddbba645f92f1355116', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(0 => '10.0.x-dev'), 'reference' => 'ad8ad6b333a5ac0e056c71c53cfb4986d4c6a548', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => 'b7bde0bbe7cdcfaa581b75192f8794bc76e92de6', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => '9ca8c4744af8378499bc90a6c9c5ebcdf0a262ec', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '811020d793ecaf231dbc9ebe0fe1af5b65f16bbf', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => 'dad80ef0e49bffbd663017d93f8f522657333947', '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-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => '542de8f22fe6f07ba744912ee339673ace27500b', 'dev_requirement' => \false), 'symplify/vendor-patches' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/vendor-patches', 'aliases' => array(), 'reference' => 'bdb421f5ccd0036792d9ff6e7317e8f2fb3b5858', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.9', 'version' => '2.8.9.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '81c769040cd0396eabed3c6d5cebe68399531c7b', '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.12.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'dev_requirement' => \false), '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), 'cweagans/composer-patches' => array('pretty_version' => '1.7.1', 'version' => '1.7.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../cweagans/composer-patches', 'aliases' => array(), 'reference' => '9888dcc74993c030b75f3dd548bb5e20cdbd740c', '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), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', '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.2', 'version' => '3.3.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => '54b287d8c2cdbe577b02e28ca1713e275b05ece2', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.6', 'version' => '3.2.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '2f261e55bd6a12057442045bf2c249806abc1d02', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.13.1', 'version' => '4.13.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '63a79e8daa781cac14e5195e63ed8ae231dd10fd', '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.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'cbe085f9fdead5b6d62e4c022ca52dc9427a10ee', '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')), 'react/cache' => array('pretty_version' => 'v1.1.1', 'version' => '1.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.4', 'version' => '0.6.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'reference' => 'a778f3fb828d68caf8a9ab6567fd8342a86f12fe', 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.8.0', 'version' => '1.8.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'reference' => '2a5a74ab751e53863b45fb87e1d3913884f88248', 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'reference' => 'be6dee480fc4692cec0504e65eb486e3be1aa6f2', 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.8.0', 'version' => '2.8.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'reference' => 'f3cff96a19736714524ca0dd1d4130de73dbbbc4', 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.7.0', 'version' => '1.7.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'reference' => '607dd79990e32fcb402cb0a176b4a4be12f97e7c', 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'reference' => 'aa6e3f8ebcd6dec3ad1ee92a449b4cc341994001', 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'dev_requirement' => \false), '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.12.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.40', 'version' => '0.11.40.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => 'bc7998f8511f4c3a401e97c0baa075495397acc8', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.13', 'version' => '0.11.13.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => 'aabe2ef9f13d2bcb79cf423e2f5ffe1a6ab382ff', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.54', 'version' => '0.11.54.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => '0b165f270ec8f73b277ba988bb51b70f8a99a01e', '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.23', 'version' => '0.11.23.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => '8e8c285cdc8937012ef27e785b0d94d4f4591327', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.12.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.43', 'version' => '0.11.43.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => 'cb0a0d27190878e63d4851d257e1d97f0b78cae1', '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.31', 'version' => '0.11.31.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'ce3e55ebce3e70efb5d984d4f5951e2263440856', 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.0')), 'symfony/config' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => 'f080af00c441f1df40cf5c269707fdebe5740557', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => '3e7ab8f5905058984899b05a4648096f558bfeba', 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v2.5.0', 'version' => '2.5.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'reference' => '1f4c95d47bddf0c1579779d4b85602c923ed2f1c', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => '3793617321eb39b2e8e708f6fd61f875ec5f0ed6', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.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.5.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.12', 'version' => '5.3.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => 'e498803a6e95ede78e9d5646ad32a2255c033a6a', 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v2.5.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.5.0')), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => 'b16fcf355b810bcbccc2c6eac1d016725dbf9002', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.11', 'version' => '5.3.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '226638aa877bc4104e619a15f27d8141cd6b4e4a', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => 'a486d6c758ba0e55d7d937aceadd0dc432c78dfc', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '3acbdc9f59fa62d01bfa87cc8dd6129a95e80e63', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => 'f336cdda76683531a586cdeb427852be3eca3891', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => 'eea4bba3ec914c845276f3f6c76a207127afc76d', 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'reference' => 'e4136bfe13508281ec285738ddd22b8a85dc0f4d', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => '1aeedea3b121e97384cddddbba645f92f1355116', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(0 => '10.0.x-dev'), 'reference' => 'ad8ad6b333a5ac0e056c71c53cfb4986d4c6a548', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => 'b7bde0bbe7cdcfaa581b75192f8794bc76e92de6', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => '9ca8c4744af8378499bc90a6c9c5ebcdf0a262ec', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '811020d793ecaf231dbc9ebe0fe1af5b65f16bbf', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => 'dad80ef0e49bffbd663017d93f8f522657333947', '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-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => '542de8f22fe6f07ba744912ee339673ace27500b', 'dev_requirement' => \false), 'symplify/vendor-patches' => array('pretty_version' => '10.0.0-beta14', 'version' => '10.0.0.0-beta14', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/vendor-patches', 'aliases' => array(), 'reference' => 'bdb421f5ccd0036792d9ff6e7317e8f2fb3b5858', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.9', 'version' => '2.8.9.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '81c769040cd0396eabed3c6d5cebe68399531c7b', '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 2b7af18f9ab..fe0e139c923 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.40'), '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.13'), '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.54'), '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.23'), '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.42'), '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.31')); + 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.40'), '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.13'), '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.54'), '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.23'), '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.43'), '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.31')); private function __construct() { } diff --git a/vendor/rector/rector-symfony/composer.json b/vendor/rector/rector-symfony/composer.json index 1425913c683..8c3708c8f6a 100644 --- a/vendor/rector/rector-symfony/composer.json +++ b/vendor/rector/rector-symfony/composer.json @@ -20,7 +20,9 @@ "symplify\/easy-coding-standard": "^10.0", "symplify\/rule-doc-generator": "^10.0", "phpstan\/extension-installer": "^1.1", - "rector\/phpstan-rules": "^0.4.4" + "rector\/phpstan-rules": "^0.4.4", + "phpstan\/phpstan-strict-rules": "^1.1", + "phpstan\/phpstan-webmozart-assert": "^1.0" }, "autoload": { "psr-4": { diff --git a/vendor/rector/rector-symfony/monorepo-builder.php b/vendor/rector/rector-symfony/monorepo-builder.php index 9adea2e328c..5c28d591314 100644 --- a/vendor/rector/rector-symfony/monorepo-builder.php +++ b/vendor/rector/rector-symfony/monorepo-builder.php @@ -8,7 +8,6 @@ use RectorPrefix20211129\Symplify\MonorepoBuilder\Release\ReleaseWorker\PushTagR use RectorPrefix20211129\Symplify\MonorepoBuilder\Release\ReleaseWorker\TagVersionReleaseWorker; return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void { $services = $containerConfigurator->services(); - $services->defaults()->autowire(); // @see https://github.com/symplify/monorepo-builder#6-release-flow $services->set(\RectorPrefix20211129\Symplify\MonorepoBuilder\Release\ReleaseWorker\TagVersionReleaseWorker::class); $services->set(\RectorPrefix20211129\Symplify\MonorepoBuilder\Release\ReleaseWorker\PushTagReleaseWorker::class); diff --git a/vendor/rector/rector-symfony/rector.php b/vendor/rector/rector-symfony/rector.php index cbf18be3f6d..287c44afa93 100644 --- a/vendor/rector/rector-symfony/rector.php +++ b/vendor/rector/rector-symfony/rector.php @@ -5,6 +5,8 @@ namespace RectorPrefix20211129; use Rector\Core\Configuration\Option; use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector; +use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; +use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void { @@ -17,8 +19,9 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat '*/Fixture/*', '*/Source/*', ]); - $containerConfigurator->import(\Rector\Set\ValueObject\SetList::PHP_74); - $containerConfigurator->import(\Rector\Set\ValueObject\SetList::PHP_80); - $containerConfigurator->import(\Rector\Set\ValueObject\SetList::DEAD_CODE); + $services = $containerConfigurator->services(); + $services->set(\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class)->call('configure', [[\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::CLASSES_TO_SKIP => ['Symfony\\*', 'Twig_*', 'Swift_*']]]); + $containerConfigurator->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_80); $containerConfigurator->import(\Rector\Set\ValueObject\SetList::CODE_QUALITY); + $containerConfigurator->import(\Rector\Set\ValueObject\SetList::DEAD_CODE); }; diff --git a/vendor/rector/rector-symfony/src/ApplicationMetadata/ListenerServiceDefinitionProvider.php b/vendor/rector/rector-symfony/src/ApplicationMetadata/ListenerServiceDefinitionProvider.php index b8ebc42608f..c75bcce8f7d 100644 --- a/vendor/rector/rector-symfony/src/ApplicationMetadata/ListenerServiceDefinitionProvider.php +++ b/vendor/rector/rector-symfony/src/ApplicationMetadata/ListenerServiceDefinitionProvider.php @@ -3,7 +3,7 @@ declare (strict_types=1); namespace Rector\Symfony\ApplicationMetadata; -use RectorPrefix20211129\Nette\Utils\Strings; +use Rector\Core\Util\StringUtils; use Rector\Symfony\DataProvider\ServiceMapProvider; use Rector\Symfony\ValueObject\ServiceDefinition; use Rector\Symfony\ValueObject\Tag\EventListenerTag; @@ -42,7 +42,7 @@ final class ListenerServiceDefinitionProvider $eventListeners = $serviceMap->getServicesByTag('kernel.event_listener'); foreach ($eventListeners as $eventListener) { // skip Symfony core listeners - if (\RectorPrefix20211129\Nette\Utils\Strings::match((string) $eventListener->getClass(), self::SYMFONY_FAMILY_REGEX)) { + if (\Rector\Core\Util\StringUtils::isMatch((string) $eventListener->getClass(), self::SYMFONY_FAMILY_REGEX)) { continue; } foreach ($eventListener->getTags() as $tag) { diff --git a/vendor/rector/rector-symfony/src/BundleClassResolver.php b/vendor/rector/rector-symfony/src/BundleClassResolver.php index fee0ec8410f..e89fba2746b 100644 --- a/vendor/rector/rector-symfony/src/BundleClassResolver.php +++ b/vendor/rector/rector-symfony/src/BundleClassResolver.php @@ -42,7 +42,7 @@ final class BundleClassResolver $classReflection = $this->reflectionProvider->getClass($class); // resolve bundle from existing ones $fileName = $classReflection->getFileName(); - if (!$fileName) { + if ($fileName === null) { return null; } $controllerDirectory = \dirname($fileName); diff --git a/vendor/rector/rector-symfony/src/Helper/TemplateGuesser.php b/vendor/rector/rector-symfony/src/Helper/TemplateGuesser.php index 233c53404bb..68d4d7eb391 100644 --- a/vendor/rector/rector-symfony/src/Helper/TemplateGuesser.php +++ b/vendor/rector/rector-symfony/src/Helper/TemplateGuesser.php @@ -101,7 +101,7 @@ final class TemplateGuesser private function resolveController(string $class) : string { $match = \RectorPrefix20211129\Nette\Utils\Strings::match($class, self::CONTROLLER_NAME_MATCH_REGEX); - if (!$match) { + if ($match === null) { return ''; } $controller = \RectorPrefix20211129\Nette\Utils\Strings::replace($match['class_name_without_suffix'], self::SMALL_LETTER_BIG_LETTER_REGEX, '1_\\2'); diff --git a/vendor/rector/rector-symfony/src/NodeFactory/GetSubscribedEventsClassMethodFactory.php b/vendor/rector/rector-symfony/src/NodeFactory/GetSubscribedEventsClassMethodFactory.php index a12f385989b..05e4a636c9e 100644 --- a/vendor/rector/rector-symfony/src/NodeFactory/GetSubscribedEventsClassMethodFactory.php +++ b/vendor/rector/rector-symfony/src/NodeFactory/GetSubscribedEventsClassMethodFactory.php @@ -93,9 +93,9 @@ final class GetSubscribedEventsClassMethodFactory foreach ($eventsToMethods as $eventName => $methodNamesWithPriorities) { $eventNameExpr = $this->eventReferenceFactory->createEventName($eventName, $eventNamesToClassConstants); // just method name, without a priority - if (!\is_array($methodNamesWithPriorities)) { - $methodNamesWithPriorities = [$methodNamesWithPriorities]; - } + // if (! is_array($methodNamesWithPriorities)) { + // $methodNamesWithPriorities = [$methodNamesWithPriorities]; + // } if (\count($methodNamesWithPriorities) === 1) { $this->createSingleMethod($methodNamesWithPriorities, $eventName, $eventNameExpr, $eventsToMethodsArray); } else { @@ -117,7 +117,7 @@ final class GetSubscribedEventsClassMethodFactory if ($priority !== null && $priority !== 0) { $methodNameWithPriorityArray = new \PhpParser\Node\Expr\Array_(); $methodNameWithPriorityArray->items[] = new \PhpParser\Node\Expr\ArrayItem(new \PhpParser\Node\Scalar\String_($methodName)); - $methodNameWithPriorityArray->items[] = new \PhpParser\Node\Expr\ArrayItem(new \PhpParser\Node\Scalar\LNumber((int) $priority)); + $methodNameWithPriorityArray->items[] = new \PhpParser\Node\Expr\ArrayItem(new \PhpParser\Node\Scalar\LNumber($priority)); return new \PhpParser\Node\Expr\ArrayItem($methodNameWithPriorityArray, $expr); } return new \PhpParser\Node\Expr\ArrayItem(new \PhpParser\Node\Scalar\String_($methodName), $expr); diff --git a/vendor/rector/rector-symfony/src/NodeFactory/OnSuccessLogoutClassMethodFactory.php b/vendor/rector/rector-symfony/src/NodeFactory/OnSuccessLogoutClassMethodFactory.php index 1d031497c3f..5cc1b596d00 100644 --- a/vendor/rector/rector-symfony/src/NodeFactory/OnSuccessLogoutClassMethodFactory.php +++ b/vendor/rector/rector-symfony/src/NodeFactory/OnSuccessLogoutClassMethodFactory.php @@ -7,12 +7,14 @@ use PhpParser\Node; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Param; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; use Rector\Core\PhpParser\Node\NodeFactory; use Rector\NodeNameResolver\NodeNameResolver; +use Rector\NodeTypeResolver\Node\AttributeKey; use RectorPrefix20211129\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser; final class OnSuccessLogoutClassMethodFactory { @@ -81,6 +83,10 @@ final class OnSuccessLogoutClassMethodFactory if (!$this->nodeNameResolver->isName($node, 'request')) { return null; } + $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); + if ($parent instanceof \PhpParser\Node\Param) { + return null; + } return new \PhpParser\Node\Expr\MethodCall(new \PhpParser\Node\Expr\Variable(self::LOGOUT_EVENT), 'getRequest'); }); } diff --git a/vendor/rector/rector-symfony/src/NodeFactory/ThisRenderFactory.php b/vendor/rector/rector-symfony/src/NodeFactory/ThisRenderFactory.php index 47f04644e7b..c03be04c5e5 100644 --- a/vendor/rector/rector-symfony/src/NodeFactory/ThisRenderFactory.php +++ b/vendor/rector/rector-symfony/src/NodeFactory/ThisRenderFactory.php @@ -70,8 +70,8 @@ final class ThisRenderFactory } private function resolveTemplateName(\PhpParser\Node\Stmt\ClassMethod $classMethod, \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $templateDoctrineAnnotationTagValueNode) : string { - $template = $templateDoctrineAnnotationTagValueNode->getValue('template') ?: $templateDoctrineAnnotationTagValueNode->getSilentValue(); - if ($template !== null) { + $template = $this->resolveTemplate($templateDoctrineAnnotationTagValueNode); + if (\is_string($template)) { return $template; } return $this->templateGuesser->resolveFromClassMethodNode($classMethod); @@ -88,7 +88,7 @@ final class ThisRenderFactory if ($return === null) { return null; } - if ($return->expr instanceof \PhpParser\Node\Expr\Array_ && \count($return->expr->items)) { + if ($return->expr instanceof \PhpParser\Node\Expr\Array_ && $return->expr->items !== []) { return $return->expr; } if ($return->expr instanceof \PhpParser\Node\Expr\MethodCall) { @@ -119,4 +119,19 @@ final class ThisRenderFactory } return null; } + /** + * @return string|null + */ + private function resolveTemplate(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) + { + $templateParameter = $doctrineAnnotationTagValueNode->getValue('template'); + if (\is_string($templateParameter)) { + return $templateParameter; + } + $silentValue = $doctrineAnnotationTagValueNode->getSilentValue(); + if (\is_string($silentValue)) { + return $silentValue; + } + return null; + } } diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php index 70188c0216b..3e092e79806 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php @@ -172,7 +172,7 @@ CODE_SAMPLE private function isSuccessfulRefactorTernaryReturn(\PhpParser\Node\Expr\Ternary $ternary) : bool { $hasChanged = \false; - if ($ternary->if && $this->valueResolver->isNull($ternary->if)) { + if ($ternary->if instanceof \PhpParser\Node\Expr && $this->valueResolver->isNull($ternary->if)) { $ternary->if = new \PhpParser\Node\Scalar\LNumber(0); $hasChanged = \true; } diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php index 3f744f3a62a..54668b3f547 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php @@ -13,6 +13,7 @@ use PhpParser\Node\Stmt\ClassMethod; use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\Rector\AbstractRector; use Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer; +use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** @@ -32,9 +33,14 @@ final class GetRequestRector extends \Rector\Core\Rector\AbstractRector * @var \Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer */ private $controllerMethodAnalyzer; - public function __construct(\Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer $controllerMethodAnalyzer) + /** + * @var \Rector\Symfony\TypeAnalyzer\ControllerAnalyzer + */ + private $controllerAnalyzer; + public function __construct(\Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer $controllerMethodAnalyzer, \Rector\Symfony\TypeAnalyzer\ControllerAnalyzer $controllerAnalyzer) { $this->controllerMethodAnalyzer = $controllerMethodAnalyzer; + $this->controllerAnalyzer = $controllerAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -72,13 +78,11 @@ CODE_SAMPLE */ public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node { + if (!$this->controllerAnalyzer->detect($node)) { + return null; + } if ($node instanceof \PhpParser\Node\Stmt\ClassMethod) { - $this->requestVariableAndParamName = $this->resolveUniqueName($node, 'request'); - if ($this->isActionWithGetRequestInBody($node)) { - $fullyQualified = new \PhpParser\Node\Name\FullyQualified(self::REQUEST_CLASS); - $node->params[] = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable($this->getRequestVariableAndParamName()), null, $fullyQualified); - return $node; - } + return $this->refactorClassMethod($node); } if ($this->isGetRequestInAction($node)) { return new \PhpParser\Node\Expr\Variable($this->getRequestVariableAndParamName()); @@ -124,25 +128,19 @@ CODE_SAMPLE } return \false; } - private function isGetRequestInAction(\PhpParser\Node $node) : bool + private function isGetRequestInAction(\PhpParser\Node\Expr\MethodCall $methodCall) : bool { - if (!$node instanceof \PhpParser\Node\Expr\MethodCall) { - return \false; - } - if (!$node->var instanceof \PhpParser\Node\Expr\Variable) { - return \false; - } // must be $this->getRequest() in controller - if (!$node->var instanceof \PhpParser\Node\Expr\Variable) { + if (!$methodCall->var instanceof \PhpParser\Node\Expr\Variable) { return \false; } - if (!$this->nodeNameResolver->isName($node->var, 'this')) { + if (!$this->nodeNameResolver->isName($methodCall->var, 'this')) { return \false; } - if (!$this->isName($node->name, 'getRequest') && !$this->isGetMethodCallWithRequestParameters($node)) { + if (!$this->isName($methodCall->name, 'getRequest') && !$this->isGetMethodCallWithRequestParameters($methodCall)) { return \false; } - $classMethod = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassMethod::class); + $classMethod = $this->betterNodeFinder->findParentType($methodCall, \PhpParser\Node\Stmt\ClassMethod::class); if (!$classMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return \false; } @@ -185,4 +183,17 @@ CODE_SAMPLE } return $this->requestVariableAndParamName; } + /** + * @return \PhpParser\Node\Stmt\ClassMethod|null + */ + private function refactorClassMethod(\PhpParser\Node\Stmt\ClassMethod $classMethod) + { + $this->requestVariableAndParamName = $this->resolveUniqueName($classMethod, 'request'); + if (!$this->isActionWithGetRequestInBody($classMethod)) { + return null; + } + $fullyQualified = new \PhpParser\Node\Name\FullyQualified(self::REQUEST_CLASS); + $classMethod->params[] = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable($this->getRequestVariableAndParamName()), null, $fullyQualified); + return $classMethod; + } } diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php index 6b8f58232b0..a9e35bde8b4 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php @@ -9,6 +9,7 @@ use PhpParser\Node\Stmt\ClassMethod; use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTagRemover; use Rector\BetterPhpDocParser\Printer\PhpDocInfoPrinter; +use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -93,7 +94,7 @@ CODE_SAMPLE if (!$symfonyDoctrineAnnotationTagValueNode instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode) { return null; } - $methods = $sensioDoctrineAnnotationTagValueNode->getValue('methods') ?: $sensioDoctrineAnnotationTagValueNode->getSilentValue(); + $methods = $this->resolveMethods($sensioDoctrineAnnotationTagValueNode); if ($methods === null) { return null; } @@ -102,4 +103,25 @@ CODE_SAMPLE $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo); return $node; } + /** + * @return mixed[]|\Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode|null + */ + private function resolveMethods(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) + { + $methodsParameter = $doctrineAnnotationTagValueNode->getValue('methods'); + if (\is_array($methodsParameter)) { + return $methodsParameter; + } + if ($methodsParameter instanceof \Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode) { + return $methodsParameter; + } + $silentValue = $doctrineAnnotationTagValueNode->getSilentValue(); + if (\is_array($silentValue)) { + return $silentValue; + } + if ($silentValue instanceof \Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode) { + return $silentValue; + } + return null; + } } diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php index 09f5b14fe4e..7a076bbd045 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php @@ -5,12 +5,10 @@ namespace Rector\Symfony\Rector\MethodCall; use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; -use PHPStan\Analyser\Scope; -use PHPStan\Reflection\ClassReflection; use PHPStan\Type\ObjectType; use Rector\Core\Rector\AbstractRector; use Rector\Defluent\NodeAnalyzer\FluentChainMethodCallNodeAnalyzer; -use Rector\NodeTypeResolver\Node\AttributeKey; +use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** @@ -22,9 +20,14 @@ final class AddFlashRector extends \Rector\Core\Rector\AbstractRector * @var \Rector\Defluent\NodeAnalyzer\FluentChainMethodCallNodeAnalyzer */ private $fluentChainMethodCallNodeAnalyzer; - public function __construct(\Rector\Defluent\NodeAnalyzer\FluentChainMethodCallNodeAnalyzer $fluentChainMethodCallNodeAnalyzer) + /** + * @var \Rector\Symfony\TypeAnalyzer\ControllerAnalyzer + */ + private $controllerAnalyzer; + public function __construct(\Rector\Defluent\NodeAnalyzer\FluentChainMethodCallNodeAnalyzer $fluentChainMethodCallNodeAnalyzer, \Rector\Symfony\TypeAnalyzer\ControllerAnalyzer $controllerAnalyzer) { $this->fluentChainMethodCallNodeAnalyzer = $fluentChainMethodCallNodeAnalyzer; + $this->controllerAnalyzer = $controllerAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -60,16 +63,7 @@ CODE_SAMPLE */ public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node { - $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); - // might be missing in a trait - if (!$scope instanceof \PHPStan\Analyser\Scope) { - return null; - } - $classReflection = $scope->getClassReflection(); - if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) { - return null; - } - if (!$classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller') && !$classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController')) { + if (!$this->controllerAnalyzer->detect($node)) { return null; } if (!$this->fluentChainMethodCallNodeAnalyzer->isTypeAndChainCalls($node, new \PHPStan\Type\ObjectType('Symfony\\Component\\HttpFoundation\\Request'), ['getSession', 'getFlashBag', 'add'])) { diff --git a/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php b/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php index 6e27887cba4..27f1d84fe4f 100644 --- a/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php +++ b/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php @@ -93,9 +93,10 @@ CODE_SAMPLE } // type analyzer $activeValueType = $this->getType($activeArgValue); - if ($activeValueType instanceof \PHPStan\Type\StringType) { - $this->processStringType($node, $argumentPosition, $activeArgValue); + if (!$activeValueType instanceof \PHPStan\Type\StringType) { + return null; } + $this->processStringType($node, $argumentPosition, $activeArgValue); return $node; } private function shouldSkipProcessMethodCall(\PhpParser\Node\Expr\MethodCall $methodCall) : bool @@ -110,9 +111,7 @@ CODE_SAMPLE { if ($firstArgumentExpr instanceof \PhpParser\Node\Expr\BinaryOp\Concat) { $arrayNode = $this->nodeTransformer->transformConcatToStringArray($firstArgumentExpr); - if ($arrayNode !== null) { - $expr->args[$argumentPosition] = new \PhpParser\Node\Arg($arrayNode); - } + $expr->args[$argumentPosition] = new \PhpParser\Node\Arg($arrayNode); return; } if ($firstArgumentExpr instanceof \PhpParser\Node\Expr\FuncCall && $this->isName($firstArgumentExpr, 'sprintf')) { diff --git a/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php b/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php index 2728d3cf0e2..47a2e07de99 100644 --- a/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php @@ -96,10 +96,7 @@ CODE_SAMPLE } private function resolveServiceType(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo, \PhpParser\Node\Stmt\Property $property) : \PHPStan\Type\Type { - $serviceType = new \PHPStan\Type\MixedType(); - if ($doctrineAnnotationTagValueNode !== null) { - $serviceType = $phpDocInfo->getVarType(); - } + $serviceType = $phpDocInfo->getVarType(); if (!$serviceType instanceof \PHPStan\Type\MixedType) { return $serviceType; } diff --git a/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php b/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php index 9d4cd1d89ad..9ef8c15c774 100644 --- a/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php +++ b/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php @@ -11,6 +11,7 @@ use PHPStan\Analyser\Scope; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\ObjectType; use Rector\Core\Rector\AbstractRector; +use Rector\Core\Util\StringUtils; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -74,11 +75,11 @@ final class ParseFileRector extends \Rector\Core\Rector\AbstractRector $possibleFileNode = $firstArg->value; $possibleFileNodeAsString = $this->print($possibleFileNode); // is yml/yaml file - if (\RectorPrefix20211129\Nette\Utils\Strings::match($possibleFileNodeAsString, self::YAML_SUFFIX_IN_QUOTE_REGEX)) { + if (\Rector\Core\Util\StringUtils::isMatch($possibleFileNodeAsString, self::YAML_SUFFIX_IN_QUOTE_REGEX)) { return \true; } // is probably a file variable - if (\RectorPrefix20211129\Nette\Utils\Strings::match($possibleFileNodeAsString, self::FILE_SUFFIX_REGEX)) { + if (\Rector\Core\Util\StringUtils::isMatch($possibleFileNodeAsString, self::FILE_SUFFIX_REGEX)) { return \true; } // try to detect current value diff --git a/vendor/rector/rector-symfony/src/TypeAnalyzer/ControllerAnalyzer.php b/vendor/rector/rector-symfony/src/TypeAnalyzer/ControllerAnalyzer.php new file mode 100644 index 00000000000..99d391268b5 --- /dev/null +++ b/vendor/rector/rector-symfony/src/TypeAnalyzer/ControllerAnalyzer.php @@ -0,0 +1,28 @@ +getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); + // might be missing in a trait + if (!$scope instanceof \PHPStan\Analyser\Scope) { + return \false; + } + $classReflection = $scope->getClassReflection(); + if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) { + return \false; + } + if ($classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller')) { + return \true; + } + return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController'); + } +} diff --git a/vendor/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php b/vendor/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php index ef6127b1595..a09157e31b6 100644 --- a/vendor/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php +++ b/vendor/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php @@ -50,12 +50,10 @@ final class JMSDITypeResolver public function resolve(\PhpParser\Node\Stmt\Property $property, \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) : \PHPStan\Type\Type { $serviceMap = $this->serviceMapProvider->provide(); - $serviceName = ($doctrineAnnotationTagValueNode->getValueWithoutQuotes('serviceName') ?: $doctrineAnnotationTagValueNode->getSilentValue()) ?: $this->nodeNameResolver->getName($property); - if ($serviceName) { - $serviceType = $this->resolveFromServiceName($serviceName, $serviceMap); - if (!$serviceType instanceof \PHPStan\Type\MixedType) { - return $serviceType; - } + $serviceName = $this->resolveServiceName($doctrineAnnotationTagValueNode, $property); + $serviceType = $this->resolveFromServiceName($serviceName, $serviceMap); + if (!$serviceType instanceof \PHPStan\Type\MixedType) { + return $serviceType; } // 3. service is in @var annotation $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property); @@ -96,4 +94,16 @@ final class JMSDITypeResolver } return new \PHPStan\Type\MixedType(); } + private function resolveServiceName(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode, \PhpParser\Node\Stmt\Property $property) : string + { + $serviceNameParameter = $doctrineAnnotationTagValueNode->getValueWithoutQuotes('serviceName'); + if (\is_string($serviceNameParameter)) { + return $serviceNameParameter; + } + $silentValue = $doctrineAnnotationTagValueNode->getSilentValue(); + if (\is_string($silentValue)) { + return $silentValue; + } + return $this->nodeNameResolver->getName($property); + } } diff --git a/vendor/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php b/vendor/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php index 49fa113cff9..370ccaf6eae 100644 --- a/vendor/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php +++ b/vendor/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php @@ -31,7 +31,7 @@ final class ServiceMapFactory $fileContents = $this->smartFileSystem->readFile($configFilePath); // "@" intentionally $xml = @\simplexml_load_string($fileContents); - if (!$xml) { + if ($xml === \false) { throw new \Rector\Symfony\Exception\XmlContainerNotExistsException(\sprintf('Container "%s" cannot be parsed', $configFilePath)); } /** @var ServiceDefinition[] $services */ diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index 5b6300cd8ea..61f14363e39 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20211129\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6', false) && !interface_exists('ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6', false) && !trait_exists('ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6', false)) { - spl_autoload_call('RectorPrefix20211129\ComposerAutoloaderInitffe715fe221b8fc7fa75381e210607f6'); +if (!class_exists('ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5', false) && !interface_exists('ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5', false) && !trait_exists('ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5', false)) { + spl_autoload_call('RectorPrefix20211129\ComposerAutoloaderInit9a0804c2fa2b16f124e30b25ead868d5'); } 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('RectorPrefix20211129\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -81,9 +81,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20211129\print_node(...func_get_args()); } } -if (!function_exists('composerRequireffe715fe221b8fc7fa75381e210607f6')) { - function composerRequireffe715fe221b8fc7fa75381e210607f6() { - return \RectorPrefix20211129\composerRequireffe715fe221b8fc7fa75381e210607f6(...func_get_args()); +if (!function_exists('composerRequire9a0804c2fa2b16f124e30b25ead868d5')) { + function composerRequire9a0804c2fa2b16f124e30b25ead868d5() { + return \RectorPrefix20211129\composerRequire9a0804c2fa2b16f124e30b25ead868d5(...func_get_args()); } } if (!function_exists('scanPath')) {