From 78e3d54584cdc2569d7a9d742a3d9e0fb3b8d1d1 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 30 Apr 2024 13:26:50 +0000 Subject: [PATCH] Updated Rector to commit 57275efac450b9b0466e9dc934d3c07e2e9a1e43 https://github.com/rectorphp/rector-src/commit/57275efac450b9b0466e9dc934d3c07e2e9a1e43 [TypeDeclarations] Add IncreaseDeclareStrictTypesRector to raise level of declare() coverage (#5849) --- .../NodeAnalyzer/DeclareStrictTypeFinder.php | 24 ++++ .../DeclareStrictTypesRector.php | 30 ++--- .../IncreaseDeclareStrictTypesRector.php | 115 ++++++++++++++++++ src/Application/VersionResolver.php | 4 +- vendor/composer/autoload_classmap.php | 2 + vendor/composer/autoload_static.php | 2 + vendor/composer/installed.json | 8 +- vendor/composer/installed.php | 2 +- 8 files changed, 163 insertions(+), 24 deletions(-) create mode 100644 rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php create mode 100644 rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php diff --git a/rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php b/rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php new file mode 100644 index 00000000000..05dab7e4bf2 --- /dev/null +++ b/rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php @@ -0,0 +1,24 @@ +declares as $declare) { + if ($declare->key->toString() === 'strict_types') { + return \true; + } + } + return \false; + } +} diff --git a/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php b/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php index 094f5df5d9e..1a84df46cf4 100644 --- a/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php +++ b/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php @@ -14,6 +14,7 @@ use Rector\ChangesReporting\ValueObject\RectorWithLineChange; use Rector\Contract\PhpParser\Node\StmtsAwareInterface; use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace; use Rector\Rector\AbstractRector; +use Rector\TypeDeclaration\NodeAnalyzer\DeclareStrictTypeFinder; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** @@ -21,6 +22,15 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class DeclareStrictTypesRector extends AbstractRector { + /** + * @readonly + * @var \Rector\TypeDeclaration\NodeAnalyzer\DeclareStrictTypeFinder + */ + private $declareStrictTypeFinder; + public function __construct(DeclareStrictTypeFinder $declareStrictTypeFinder) + { + $this->declareStrictTypeFinder = $declareStrictTypeFinder; + } public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Add declare(strict_types=1) if missing', [new CodeSample(<<<'CODE_SAMPLE' @@ -62,10 +72,9 @@ CODE_SAMPLE $nodes = $rootStmt->stmts; $stmt = $currentStmt; } - if (!$stmt instanceof Stmt) { - return null; - } - if ($this->shouldSkip($stmt)) { + // when first stmt is Declare_, verify if there is strict_types definition already, + // as multiple declare is allowed, with declare(strict_types=1) only allowed on very first stmt + if ($this->declareStrictTypeFinder->hasDeclareStrictTypes($stmt)) { return null; } $declareDeclare = new DeclareDeclare(new Identifier('strict_types'), new LNumber(1)); @@ -94,17 +103,4 @@ CODE_SAMPLE // workaroudn, as Rector now only hooks to specific nodes, not arrays return null; } - private function shouldSkip(Stmt $stmt) : bool - { - // when first stmt is Declare_, verify if there is strict_types definition already, - // as multiple declare is allowed, with declare(strict_types=1) only allowed on very first stmt - if ($stmt instanceof Declare_) { - foreach ($stmt->declares as $declare) { - if ($declare->key->toString() === 'strict_types') { - return \true; - } - } - } - return \false; - } } diff --git a/rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php b/rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php new file mode 100644 index 00000000000..020c77a80e6 --- /dev/null +++ b/rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php @@ -0,0 +1,115 @@ +declareStrictTypeFinder = $declareStrictTypeFinder; + } + public function getRuleDefinition() : RuleDefinition + { + return new RuleDefinition('Add declare strict types to a limited amount of classes at a time, to try out in the wild and increase level gradually', [new ConfiguredCodeSample(<<<'CODE_SAMPLE' +function someFunction() +{ +} +CODE_SAMPLE +, <<<'CODE_SAMPLE' +declare(strict_types=1); + +function someFunction() +{ +} +CODE_SAMPLE +, [self::LIMIT => 10])]); + } + /** + * @param Node[] $nodes + * @return Node[]|null + */ + public function beforeTraverse(array $nodes) : ?array + { + parent::beforeTraverse($nodes); + $newStmts = $this->file->getNewStmts(); + if ($newStmts === []) { + return null; + } + $rootStmt = \current($newStmts); + $stmt = $rootStmt; + // skip classes without namespace for safety reasons + if ($rootStmt instanceof FileWithoutNamespace) { + return null; + } + if ($this->declareStrictTypeFinder->hasDeclareStrictTypes($stmt)) { + return null; + } + // keep change withing a limit + if ($this->changedItemCount >= $this->limit) { + return null; + } + ++$this->changedItemCount; + $strictTypesDeclare = $this->creteStrictTypesDeclare(); + $rectorWithLineChange = new RectorWithLineChange(self::class, $stmt->getLine()); + $this->file->addRectorClassWithLine($rectorWithLineChange); + return \array_merge([$strictTypesDeclare, new Nop()], $nodes); + } + /** + * @return array> + */ + public function getNodeTypes() : array + { + return [StmtsAwareInterface::class]; + } + /** + * @param StmtsAwareInterface $node + */ + public function refactor(Node $node) : ?Node + { + // workaround, as Rector now only hooks to specific nodes, not arrays + return null; + } + public function configure(array $configuration) : void + { + Assert::keyExists($configuration, self::LIMIT); + $this->limit = (int) $configuration[self::LIMIT]; + } + private function creteStrictTypesDeclare() : Declare_ + { + $declareDeclare = new DeclareDeclare(new Identifier('strict_types'), new LNumber(1)); + return new Declare_([$declareDeclare]); + } +} diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 118c1a5e5e7..bfe7ab9101d 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'ce1033d8e6434f3111307dd274dec753eb6481b1'; + public const PACKAGE_VERSION = '57275efac450b9b0466e9dc934d3c07e2e9a1e43'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-30 19:39:49'; + public const RELEASE_DATE = '2024-04-30 13:22:44'; /** * @var int */ diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 393cd025edd..7e6d8c5d245 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2362,6 +2362,7 @@ return array( 'Rector\\TypeDeclaration\\NodeAnalyzer\\CallerParamMatcher' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ClassMethodAndPropertyAnalyzer' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/ClassMethodAndPropertyAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ClassMethodParamTypeCompleter' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/ClassMethodParamTypeCompleter.php', + 'Rector\\TypeDeclaration\\NodeAnalyzer\\DeclareStrictTypeFinder' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\NeverFuncCallAnalyzer' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/NeverFuncCallAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ParamAnalyzer' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/ParamAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ReturnAnalyzer' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/ReturnAnalyzer.php', @@ -2422,6 +2423,7 @@ return array( 'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php', 'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php', 'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\DeclareStrictTypesRector' => $baseDir . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php', + 'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\IncreaseDeclareStrictTypesRector' => $baseDir . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php', 'Rector\\TypeDeclaration\\Rector\\While_\\WhileNullableToInstanceofRector' => $baseDir . '/rules/TypeDeclaration/Rector/While_/WhileNullableToInstanceofRector.php', 'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictBoolExprAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictBoolExprAnalyzer.php', 'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictScalarExprAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 9dd449fcbb4..9206131a6f2 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -2581,6 +2581,7 @@ class ComposerStaticInit70e3025dac7e7555f69a9b4ca9e3dfde 'Rector\\TypeDeclaration\\NodeAnalyzer\\CallerParamMatcher' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ClassMethodAndPropertyAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/ClassMethodAndPropertyAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ClassMethodParamTypeCompleter' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/ClassMethodParamTypeCompleter.php', + 'Rector\\TypeDeclaration\\NodeAnalyzer\\DeclareStrictTypeFinder' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/DeclareStrictTypeFinder.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\NeverFuncCallAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/NeverFuncCallAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ParamAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/ParamAnalyzer.php', 'Rector\\TypeDeclaration\\NodeAnalyzer\\ReturnAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/ReturnAnalyzer.php', @@ -2641,6 +2642,7 @@ class ComposerStaticInit70e3025dac7e7555f69a9b4ca9e3dfde 'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php', 'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php', 'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\DeclareStrictTypesRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php', + 'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\IncreaseDeclareStrictTypesRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/IncreaseDeclareStrictTypesRector.php', 'Rector\\TypeDeclaration\\Rector\\While_\\WhileNullableToInstanceofRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/While_/WhileNullableToInstanceofRector.php', 'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictBoolExprAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictBoolExprAnalyzer.php', 'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictScalarExprAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bde1982b26e..01dcc0e8a67 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -504,8 +504,8 @@ }, { "name": "illuminate\/container", - "version": "v10.48.9", - "version_normalized": "10.48.9.0", + "version": "v10.48.10", + "version_normalized": "10.48.10.0", "source": { "type": "git", "url": "https:\/\/github.com\/illuminate\/container.git", @@ -561,8 +561,8 @@ }, { "name": "illuminate\/contracts", - "version": "v10.48.9", - "version_normalized": "10.48.9.0", + "version": "v10.48.10", + "version_normalized": "10.48.10.0", "source": { "type": "git", "url": "https:\/\/github.com\/illuminate\/contracts.git", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 24dc4b0bcbe..9b3cbdb9bee 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202404; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.3', 'version' => '3.1.3.0', 'reference' => '5b16e25a5355f1f3afdfc2f954a0a80aec4826a8', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.4', 'version' => '3.0.4.0', 'reference' => '4f988f8fdf580d53bdb2d1278fe93d1ed5462255', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v10.48.9', 'version' => '10.48.9.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.48.9', 'version' => '10.48.9.0', 'reference' => '8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v4.0.4', 'version' => '4.0.4.0', 'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.19.1', 'version' => '4.19.1.0', 'reference' => '4e1b88d21c69391150ace211e9eaf05810858d0b', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => '8b0223b5ed235fd377c75fdd1bfcad05c0f168b8', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.28.0', 'version' => '1.28.0.0', 'reference' => 'cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.10.57')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => 'c134600642fa615b46b41237ef243daa65bb64ec', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '1a8460931ea36dc5c76838fec5734d55c88c6831', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '364e273976d869506f40126ea6b69330df69a45e', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '4228a7305efbd92687cf7f6cbf7b683a28412eb1', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '7065f6eb4108e0c5ccff18582d6dc03a65bf7bdc', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '040014c3af8a300dadfc1d9a0f09043572dfd79b', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => 'a170e64ae10d00ba89e2acbb590dc2e54da8ad8f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '78dde75f8f6dbbca4ec436a4b0087f7af02076d4', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '511c48990be17358c23bf45c5d71ab85d40fb764', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.29.0', 'version' => '1.29.0.0', 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => 'cdb1c81c145fd5aa9b0038bab694035020943381', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.4.2', 'version' => '3.4.2.0', 'reference' => '11bbf19a0fb7b36345861e85c5768844c552906e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '53e8b1ef30a65f78eac60fddc5ee7ebbbdb1dee0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.2.0', 'version' => '11.2.0.0', 'reference' => '479cfcfd46047f80624aba931d9789e50475b5c6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); +return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.3', 'version' => '3.1.3.0', 'reference' => '5b16e25a5355f1f3afdfc2f954a0a80aec4826a8', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.4', 'version' => '3.0.4.0', 'reference' => '4f988f8fdf580d53bdb2d1278fe93d1ed5462255', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v10.48.10', 'version' => '10.48.10.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.48.10', 'version' => '10.48.10.0', 'reference' => '8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v4.0.4', 'version' => '4.0.4.0', 'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.19.1', 'version' => '4.19.1.0', 'reference' => '4e1b88d21c69391150ace211e9eaf05810858d0b', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => '8b0223b5ed235fd377c75fdd1bfcad05c0f168b8', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.28.0', 'version' => '1.28.0.0', 'reference' => 'cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.10.57')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => 'c134600642fa615b46b41237ef243daa65bb64ec', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '1a8460931ea36dc5c76838fec5734d55c88c6831', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '364e273976d869506f40126ea6b69330df69a45e', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '4228a7305efbd92687cf7f6cbf7b683a28412eb1', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '7065f6eb4108e0c5ccff18582d6dc03a65bf7bdc', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '040014c3af8a300dadfc1d9a0f09043572dfd79b', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => 'a170e64ae10d00ba89e2acbb590dc2e54da8ad8f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '78dde75f8f6dbbca4ec436a4b0087f7af02076d4', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '511c48990be17358c23bf45c5d71ab85d40fb764', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.29.0', 'version' => '1.29.0.0', 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => 'cdb1c81c145fd5aa9b0038bab694035020943381', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.4.2', 'version' => '3.4.2.0', 'reference' => '11bbf19a0fb7b36345861e85c5768844c552906e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v6.4.7', 'version' => '6.4.7.0', 'reference' => '53e8b1ef30a65f78eac60fddc5ee7ebbbdb1dee0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.2.0', 'version' => '11.2.0.0', 'reference' => '479cfcfd46047f80624aba931d9789e50475b5c6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false)));