From 7141ae6e56dac8da5f33eec8971abb252fd59a51 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 24 Apr 2024 08:56:31 +0000 Subject: [PATCH] Updated Rector to commit 8281a06bc8432d9d7f8e20842e3961df99a277bc https://github.com/rectorphp/rector-src/commit/8281a06bc8432d9d7f8e20842e3961df99a277bc [PHP 7.2] Add error suppres support to each() rule (#5844) --- .../IsClassMethodUsedAnalyzer.php | 2 +- rules/Php72/Rector/Assign/ListEachRector.php | 42 +++++++++---------- .../While_/WhileEachToForeachRector.php | 27 +++++------- rules/Php72/ValueObject/ListAndEach.php | 33 +++++++++++++++ src/Application/VersionResolver.php | 4 +- src/NodeManipulator/AssignManipulator.php | 28 ++++++++++--- vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_static.php | 1 + vendor/composer/installed.json | 8 ++-- vendor/composer/installed.php | 2 +- 10 files changed, 94 insertions(+), 54 deletions(-) create mode 100644 rules/Php72/ValueObject/ListAndEach.php diff --git a/rules/DeadCode/NodeAnalyzer/IsClassMethodUsedAnalyzer.php b/rules/DeadCode/NodeAnalyzer/IsClassMethodUsedAnalyzer.php index 10c35d41739..425ae30f3a9 100644 --- a/rules/DeadCode/NodeAnalyzer/IsClassMethodUsedAnalyzer.php +++ b/rules/DeadCode/NodeAnalyzer/IsClassMethodUsedAnalyzer.php @@ -3,13 +3,13 @@ declare (strict_types=1); namespace Rector\DeadCode\NodeAnalyzer; -use PhpParser\Node\Expr\NullsafeMethodCall; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\CallLike; use PhpParser\Node\Expr\MethodCall; +use PhpParser\Node\Expr\NullsafeMethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Class_; diff --git a/rules/Php72/Rector/Assign/ListEachRector.php b/rules/Php72/Rector/Assign/ListEachRector.php index 5b11689bdb4..4829372f723 100644 --- a/rules/Php72/Rector/Assign/ListEachRector.php +++ b/rules/Php72/Rector/Assign/ListEachRector.php @@ -6,12 +6,11 @@ namespace Rector\Php72\Rector\Assign; use PhpParser\Node; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Assign; -use PhpParser\Node\Expr\FuncCall; -use PhpParser\Node\Expr\List_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use Rector\Exception\ShouldNotHappenException; use Rector\NodeManipulator\AssignManipulator; +use Rector\Php72\ValueObject\ListAndEach; use Rector\Rector\AbstractRector; use Rector\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -65,58 +64,55 @@ CODE_SAMPLE if (!$node->expr instanceof Assign) { return null; } - $assign = $node->expr; - if ($this->shouldSkipAssign($assign)) { + $listAndEach = $this->assignManipulator->matchListAndEach($node->expr); + if (!$listAndEach instanceof ListAndEach) { return null; } - /** @var List_ $listNode */ - $listNode = $assign->var; - /** @var FuncCall $eachFuncCall */ - $eachFuncCall = $assign->expr; + if ($this->shouldSkipAssign($listAndEach)) { + return null; + } + $list = $listAndEach->getList(); + $eachFuncCall = $listAndEach->getEachFuncCall(); // only key: list($key, ) = each($values); - if ($listNode->items[0] instanceof ArrayItem && !$listNode->items[1] instanceof ArrayItem) { + if ($list->items[0] instanceof ArrayItem && !$list->items[1] instanceof ArrayItem) { $keyFuncCall = $this->nodeFactory->createFuncCall('key', $eachFuncCall->args); - $keyFuncCallAssign = new Assign($listNode->items[0]->value, $keyFuncCall); + $keyFuncCallAssign = new Assign($list->items[0]->value, $keyFuncCall); return new Expression($keyFuncCallAssign); } // only value: list(, $value) = each($values); - if ($listNode->items[1] instanceof ArrayItem && !$listNode->items[0] instanceof ArrayItem) { + if ($list->items[1] instanceof ArrayItem && !$list->items[0] instanceof ArrayItem) { $nextFuncCall = $this->nodeFactory->createFuncCall('next', $eachFuncCall->args); $currentFuncCall = $this->nodeFactory->createFuncCall('current', $eachFuncCall->args); - $secondArrayItem = $listNode->items[1]; + $secondArrayItem = $list->items[1]; $currentAssign = new Assign($secondArrayItem->value, $currentFuncCall); return [new Expression($currentAssign), new Expression($nextFuncCall)]; } // both: list($key, $value) = each($values); $currentFuncCall = $this->nodeFactory->createFuncCall('current', $eachFuncCall->args); - $secondArrayItem = $listNode->items[1]; + $secondArrayItem = $list->items[1]; if (!$secondArrayItem instanceof ArrayItem) { throw new ShouldNotHappenException(); } $currentAssign = new Assign($secondArrayItem->value, $currentFuncCall); $nextFuncCall = $this->nodeFactory->createFuncCall('next', $eachFuncCall->args); $keyFuncCall = $this->nodeFactory->createFuncCall('key', $eachFuncCall->args); - $firstArrayItem = $listNode->items[0]; + $firstArrayItem = $list->items[0]; if (!$firstArrayItem instanceof ArrayItem) { throw new ShouldNotHappenException(); } $keyAssign = new Assign($firstArrayItem->value, $keyFuncCall); return [new Expression($keyAssign), new Expression($currentAssign), new Expression($nextFuncCall)]; } - private function shouldSkipAssign(Assign $assign) : bool + private function shouldSkipAssign(ListAndEach $listAndEach) : bool { - if (!$this->assignManipulator->isListToEachAssign($assign)) { - return \true; - } - /** @var List_ $listNode */ - $listNode = $assign->var; - if (\count($listNode->items) !== 2) { + $list = $listAndEach->getList(); + if (\count($list->items) !== 2) { return \true; } // empty list → cannot handle - if ($listNode->items[0] instanceof ArrayItem) { + if ($list->items[0] instanceof ArrayItem) { return \false; } - return !$listNode->items[1] instanceof ArrayItem; + return !$list->items[1] instanceof ArrayItem; } } diff --git a/rules/Php72/Rector/While_/WhileEachToForeachRector.php b/rules/Php72/Rector/While_/WhileEachToForeachRector.php index 78bb42ddb56..749e9dbafb8 100644 --- a/rules/Php72/Rector/While_/WhileEachToForeachRector.php +++ b/rules/Php72/Rector/While_/WhileEachToForeachRector.php @@ -6,11 +6,10 @@ namespace Rector\Php72\Rector\While_; use PhpParser\Node; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Assign; -use PhpParser\Node\Expr\FuncCall; -use PhpParser\Node\Expr\List_; use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\While_; use Rector\NodeManipulator\AssignManipulator; +use Rector\Php72\ValueObject\ListAndEach; use Rector\Rector\AbstractRector; use Rector\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -75,37 +74,31 @@ CODE_SAMPLE if (!$node->cond instanceof Assign) { return null; } - /** @var Assign $assignNode */ - $assignNode = $node->cond; - if (!$this->assignManipulator->isListToEachAssign($assignNode)) { + $listAndEach = $this->assignManipulator->matchListAndEach($node->cond); + if (!$listAndEach instanceof ListAndEach) { return null; } - /** @var FuncCall $eachFuncCall */ - $eachFuncCall = $assignNode->expr; - if ($eachFuncCall->isFirstClassCallable()) { - return null; - } - /** @var List_ $listNode */ - $listNode = $assignNode->var; + $eachFuncCall = $listAndEach->getEachFuncCall(); + $list = $listAndEach->getList(); if (!isset($eachFuncCall->getArgs()[0])) { return null; } $firstArg = $eachFuncCall->getArgs()[0]; - $foreachedExpr = \count($listNode->items) === 1 ? $this->nodeFactory->createFuncCall('array_keys', [$firstArg]) : $firstArg->value; - $arrayItem = \array_pop($listNode->items); + $foreachedExpr = \count($list->items) === 1 ? $this->nodeFactory->createFuncCall('array_keys', [$firstArg]) : $firstArg->value; + $arrayItem = \array_pop($list->items); $isTrailingCommaLast = \false; if (!$arrayItem instanceof ArrayItem) { $foreachedExpr = $this->nodeFactory->createFuncCall('array_keys', [$eachFuncCall->args[0]]); /** @var ArrayItem $arrayItem */ - $arrayItem = \current($listNode->items); + $arrayItem = \current($list->items); $isTrailingCommaLast = \true; } $foreach = new Foreach_($foreachedExpr, $arrayItem, ['stmts' => $node->stmts]); $this->mirrorComments($foreach, $node); // is key included? add it to foreach - if ($listNode->items !== []) { + if ($list->items !== []) { /** @var ArrayItem|null $keyItem */ - $keyItem = \array_pop($listNode->items); + $keyItem = \array_pop($list->items); if ($keyItem instanceof ArrayItem && !$isTrailingCommaLast) { $foreach->keyVar = $keyItem->value; } diff --git a/rules/Php72/ValueObject/ListAndEach.php b/rules/Php72/ValueObject/ListAndEach.php new file mode 100644 index 00000000000..a60db26b36d --- /dev/null +++ b/rules/Php72/ValueObject/ListAndEach.php @@ -0,0 +1,33 @@ +list = $list; + $this->eachFuncCall = $eachFuncCall; + } + public function getList() : List_ + { + return $this->list; + } + public function getEachFuncCall() : FuncCall + { + return $this->eachFuncCall; + } +} diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 84a9e68c7e7..4083241da2d 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 = 'd5069f0fccf649646eeea05b5291c0ac34e511d6'; + public const PACKAGE_VERSION = '8281a06bc8432d9d7f8e20842e3961df99a277bc'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-23 19:08:22'; + public const RELEASE_DATE = '2024-04-24 08:54:03'; /** * @var int */ diff --git a/src/NodeManipulator/AssignManipulator.php b/src/NodeManipulator/AssignManipulator.php index dd31b6aba58..36959236a1c 100644 --- a/src/NodeManipulator/AssignManipulator.php +++ b/src/NodeManipulator/AssignManipulator.php @@ -5,6 +5,7 @@ namespace Rector\NodeManipulator; use PhpParser\Node; use PhpParser\Node\Expr\Assign; +use PhpParser\Node\Expr\ErrorSuppress; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\List_; use PhpParser\Node\Expr\PropertyFetch; @@ -13,6 +14,7 @@ use PhpParser\Node\FunctionLike; use Rector\NodeAnalyzer\PropertyFetchAnalyzer; use Rector\NodeNameResolver\NodeNameResolver; use Rector\NodeTypeResolver\Node\AttributeKey; +use Rector\Php72\ValueObject\ListAndEach; use Rector\PhpParser\Node\BetterNodeFinder; final class AssignManipulator { @@ -39,17 +41,31 @@ final class AssignManipulator } /** * Matches: - * each() = [1, 2]; + * list([1, 2]) = each($items) */ - public function isListToEachAssign(Assign $assign) : bool + public function matchListAndEach(Assign $assign) : ?ListAndEach { - if (!$assign->expr instanceof FuncCall) { - return \false; + // could be behind error suppress + if ($assign->expr instanceof ErrorSuppress) { + $errorSuppress = $assign->expr; + $bareExpr = $errorSuppress->expr; + } else { + $bareExpr = $assign->expr; + } + if (!$bareExpr instanceof FuncCall) { + return null; } if (!$assign->var instanceof List_) { - return \false; + return null; } - return $this->nodeNameResolver->isName($assign->expr, 'each'); + if (!$this->nodeNameResolver->isName($bareExpr, 'each')) { + return null; + } + // no placeholders + if ($bareExpr->isFirstClassCallable()) { + return null; + } + return new ListAndEach($assign->var, $bareExpr); } public function isLeftPartOfAssign(Node $node) : bool { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 88dfe8aef92..393cd025edd 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1841,6 +1841,7 @@ return array( 'Rector\\Php72\\Rector\\FuncCall\\StringsAssertNakedRector' => $baseDir . '/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php', 'Rector\\Php72\\Rector\\Unset_\\UnsetCastRector' => $baseDir . '/rules/Php72/Rector/Unset_/UnsetCastRector.php', 'Rector\\Php72\\Rector\\While_\\WhileEachToForeachRector' => $baseDir . '/rules/Php72/Rector/While_/WhileEachToForeachRector.php', + 'Rector\\Php72\\ValueObject\\ListAndEach' => $baseDir . '/rules/Php72/ValueObject/ListAndEach.php', 'Rector\\Php73\\Rector\\BooleanOr\\IsCountableRector' => $baseDir . '/rules/Php73/Rector/BooleanOr/IsCountableRector.php', 'Rector\\Php73\\Rector\\ConstFetch\\SensitiveConstantNameRector' => $baseDir . '/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php', 'Rector\\Php73\\Rector\\FuncCall\\ArrayKeyFirstLastRector' => $baseDir . '/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 2704cf10410..3dbee7348be 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -2060,6 +2060,7 @@ class ComposerStaticInit005507a96a37a412a8adf9cfaae1e621 'Rector\\Php72\\Rector\\FuncCall\\StringsAssertNakedRector' => __DIR__ . '/../..' . '/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php', 'Rector\\Php72\\Rector\\Unset_\\UnsetCastRector' => __DIR__ . '/../..' . '/rules/Php72/Rector/Unset_/UnsetCastRector.php', 'Rector\\Php72\\Rector\\While_\\WhileEachToForeachRector' => __DIR__ . '/../..' . '/rules/Php72/Rector/While_/WhileEachToForeachRector.php', + 'Rector\\Php72\\ValueObject\\ListAndEach' => __DIR__ . '/../..' . '/rules/Php72/ValueObject/ListAndEach.php', 'Rector\\Php73\\Rector\\BooleanOr\\IsCountableRector' => __DIR__ . '/../..' . '/rules/Php73/Rector/BooleanOr/IsCountableRector.php', 'Rector\\Php73\\Rector\\ConstFetch\\SensitiveConstantNameRector' => __DIR__ . '/../..' . '/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php', 'Rector\\Php73\\Rector\\FuncCall\\ArrayKeyFirstLastRector' => __DIR__ . '/../..' . '/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index c79472d47a4..cf0a27bb8dc 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -504,8 +504,8 @@ }, { "name": "illuminate\/container", - "version": "v10.48.8", - "version_normalized": "10.48.8.0", + "version": "v10.48.9", + "version_normalized": "10.48.9.0", "source": { "type": "git", "url": "https:\/\/github.com\/illuminate\/container.git", @@ -561,8 +561,8 @@ }, { "name": "illuminate\/contracts", - "version": "v10.48.8", - "version_normalized": "10.48.8.0", + "version": "v10.48.9", + "version_normalized": "10.48.9.0", "source": { "type": "git", "url": "https:\/\/github.com\/illuminate\/contracts.git", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 5ca6d0b712c..9820aa614cd 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.8', 'version' => '10.48.8.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.48.8', 'version' => '10.48.8.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' => 'ea7e84438061f3c39c59cb029e6c55b39002d8f8', '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' => '05e44cfe25504ac9de978b9b977caf207ed0c9e1', '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' => 'b9cff121a6821e6dedfbbfc59f4989c48505438b', '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' => 'b8126e8bf6e239fd53329fcd715ea117a4b4c34c', '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.6', 'version' => '6.4.6.0', 'reference' => 'a2708a5da5c87d1d0d52937bdeac625df659e11f', '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.6', 'version' => '6.4.6.0', 'reference' => '9919b5509ada52cc7f66f9a35c86a4a29955c9d3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', 'reference' => '11d736e97f116ac375a81f96e662911a34cd50ce', '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.4', 'version' => '6.4.4.0', 'reference' => '710e27879e9be3395de2b98da3f52a946039f297', '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.3', 'version' => '6.4.3.0', 'reference' => 'd75715985f0f94f978e3a8fa42533e10db921b90', '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.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' => 'ea7e84438061f3c39c59cb029e6c55b39002d8f8', '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' => '05e44cfe25504ac9de978b9b977caf207ed0c9e1', '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' => 'b9cff121a6821e6dedfbbfc59f4989c48505438b', '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' => 'b8126e8bf6e239fd53329fcd715ea117a4b4c34c', '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.6', 'version' => '6.4.6.0', 'reference' => 'a2708a5da5c87d1d0d52937bdeac625df659e11f', '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.6', 'version' => '6.4.6.0', 'reference' => '9919b5509ada52cc7f66f9a35c86a4a29955c9d3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', 'reference' => '11d736e97f116ac375a81f96e662911a34cd50ce', '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.4', 'version' => '6.4.4.0', 'reference' => '710e27879e9be3395de2b98da3f52a946039f297', '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.3', 'version' => '6.4.3.0', 'reference' => 'd75715985f0f94f978e3a8fa42533e10db921b90', '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)));