diff --git a/packages/NodeRemoval/NodeRemover.php b/packages/NodeRemoval/NodeRemover.php index 9e898925177..aa15c3d0c65 100644 --- a/packages/NodeRemoval/NodeRemover.php +++ b/packages/NodeRemoval/NodeRemover.php @@ -4,16 +4,7 @@ declare (strict_types=1); namespace Rector\NodeRemoval; use PhpParser\Node; -use PhpParser\Node\Expr\Closure; -use PhpParser\Node\Expr\FuncCall; -use PhpParser\Node\Expr\MethodCall; -use PhpParser\Node\Expr\StaticCall; -use PhpParser\Node\Param; -use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\Node\Stmt\Function_; use Rector\ChangesReporting\Collector\RectorChangeCollector; -use Rector\Core\Exception\ShouldNotHappenException; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PostRector\Collector\NodesToRemoveCollector; final class NodeRemover @@ -47,21 +38,6 @@ final class NodeRemover $this->nodesToRemoveCollector->addNodeToRemove($node); $this->rectorChangeCollector->notifyNodeFileInfo($node); } - /** - * @api used in rector-doctrine - * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $nodeWithStatements - */ - public function removeNodeFromStatements($nodeWithStatements, Node $toBeRemovedNode) : void - { - foreach ((array) $nodeWithStatements->stmts as $key => $stmt) { - if ($toBeRemovedNode !== $stmt) { - continue; - } - $this->removeNode($stmt); - unset($nodeWithStatements->stmts[$key]); - break; - } - } /** * @param Node[] $nodes */ @@ -71,51 +47,4 @@ final class NodeRemover $this->removeNode($node); } } - /** - * @param int|\PhpParser\Node\Param $keyOrParam - */ - public function removeParam(ClassMethod $classMethod, $keyOrParam) : void - { - $key = $keyOrParam instanceof Param ? $keyOrParam->getAttribute(AttributeKey::PARAMETER_POSITION) : $keyOrParam; - if ($classMethod->params === null) { - throw new ShouldNotHappenException(); - } - // already removed - if (!isset($classMethod->params[$key])) { - return; - } - $this->removeNode($classMethod->params[$key]); - unset($classMethod->params[$key]); - } - /** - * @param \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node - */ - public function removeArg($node, int $key) : void - { - if ($node->getArgs() === []) { - throw new ShouldNotHappenException(); - } - // already removed - if (!isset($node->args[$key])) { - return; - } - $this->removeNode($node->args[$key]); - unset($node->args[$key]); - } - /** - * @api phpunit - * @param \PhpParser\Node\Expr\Closure|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $functionLike - */ - public function removeStmt($functionLike, int $key) : void - { - if ($functionLike->stmts === null) { - throw new ShouldNotHappenException(); - } - // already removed - if (!isset($functionLike->stmts[$key])) { - return; - } - $this->removeNode($functionLike->stmts[$key]); - unset($functionLike->stmts[$key]); - } } diff --git a/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php b/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php index a08bff11b42..3281fbfce1e 100644 --- a/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php +++ b/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php @@ -129,7 +129,7 @@ CODE_SAMPLE $paramName = $this->getName($paramNode->var); $propertyMetadata = new PropertyMetadata($paramName, $paramType, Class_::MODIFIER_PRIVATE); $this->propertyToAddCollector->addPropertyToClass($class, $propertyMetadata); - $this->nodeRemover->removeParam($classMethod, $key); + unset($classMethod->params[$key]); $this->variablesToPropertyFetchCollection->addVariableNameAndType($paramName, $paramType); } } diff --git a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php index aa26e2c145a..c4b4c2cd31b 100644 --- a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php +++ b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE { if ($argumentRemover->getValue() === null) { if ($node instanceof MethodCall || $node instanceof StaticCall) { - $this->nodeRemover->removeArg($node, $argumentRemover->getPosition()); + unset($node->args[$argumentRemover->getPosition()]); } else { - $this->nodeRemover->removeParam($node, $argumentRemover->getPosition()); + unset($node->params[$argumentRemover->getPosition()]); } return; } @@ -103,7 +103,7 @@ CODE_SAMPLE } if ($this->isArgumentValueMatch($node->args[$argumentRemover->getPosition()], $match)) { $this->hasChanged = \true; - $this->nodeRemover->removeArg($node, $argumentRemover->getPosition()); + unset($node->args[$argumentRemover->getPosition()]); } } /** @@ -113,14 +113,14 @@ CODE_SAMPLE { if ($node instanceof MethodCall || $node instanceof StaticCall) { if (isset($node->args[$position]) && $this->isName($node->args[$position], $name)) { - $this->nodeRemover->removeArg($node, $position); + unset($node->args[$position]); } return; } if (!(isset($node->params[$position]) && $this->isName($node->params[$position], $name))) { return; } - $this->nodeRemover->removeParam($node, $position); + unset($node->params[$position]); } /** * @param mixed[] $values diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 231a79b0cf3..4d0bc071dc6 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 = '8f24c73f1894356dd9ad3745924d027fa65a5602'; + public const PACKAGE_VERSION = 'cd48bfcc4785fb0d2cf828240f8f71231b232c85'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-05-29 09:05:07'; + public const RELEASE_DATE = '2023-05-29 08:35:20'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 1fd345768a6..101cf31e473 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit7977ba338c257f0b70710b3404e69e00::getLoader(); +return ComposerAutoloaderInitf1683014dc82e46c87167ac2cba04155::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index c2f0dd150bb..5b853d71e6a 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1643,7 +1643,6 @@ return array( 'Rector\\Doctrine\\NodeAnalyzer\\AttrinationFinder' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/AttrinationFinder.php', 'Rector\\Doctrine\\NodeAnalyzer\\ConstructorAssignPropertyAnalyzer' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/ConstructorAssignPropertyAnalyzer.php', 'Rector\\Doctrine\\NodeAnalyzer\\EntityObjectTypeResolver' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/EntityObjectTypeResolver.php', - 'Rector\\Doctrine\\NodeAnalyzer\\MethodCallNameOnTypeResolver' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/MethodCallNameOnTypeResolver.php', 'Rector\\Doctrine\\NodeAnalyzer\\SetterClassMethodAnalyzer' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/SetterClassMethodAnalyzer.php', 'Rector\\Doctrine\\NodeAnalyzer\\TargetEntityResolver' => $vendorDir . '/rector/rector-doctrine/src/NodeAnalyzer/TargetEntityResolver.php', 'Rector\\Doctrine\\NodeFactory\\ArrayCollectionAssignFactory' => $vendorDir . '/rector/rector-doctrine/src/NodeFactory/ArrayCollectionAssignFactory.php', @@ -1656,7 +1655,6 @@ return array( 'Rector\\Doctrine\\NodeFactory\\ValueAssignFactory' => $vendorDir . '/rector/rector-doctrine/src/NodeFactory/ValueAssignFactory.php', 'Rector\\Doctrine\\NodeManipulator\\ColumnPropertyTypeResolver' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/ColumnPropertyTypeResolver.php', 'Rector\\Doctrine\\NodeManipulator\\ConstructorManipulator' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/ConstructorManipulator.php', - 'Rector\\Doctrine\\NodeManipulator\\DependencyRemover' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/DependencyRemover.php', 'Rector\\Doctrine\\NodeManipulator\\DoctrineItemDefaultValueManipulator' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/DoctrineItemDefaultValueManipulator.php', 'Rector\\Doctrine\\NodeManipulator\\IssetDimFetchCleaner' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/IssetDimFetchCleaner.php', 'Rector\\Doctrine\\NodeManipulator\\NullabilityColumnPropertyTypeResolver' => $vendorDir . '/rector/rector-doctrine/src/NodeManipulator/NullabilityColumnPropertyTypeResolver.php', @@ -1671,7 +1669,6 @@ return array( 'Rector\\Doctrine\\Rector\\Class_\\AddEntityIdByConditionRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php', 'Rector\\Doctrine\\Rector\\Class_\\ClassAnnotationToNamedArgumentConstructorRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\InitializeDefaultEntityCollectionRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php', - 'Rector\\Doctrine\\Rector\\Class_\\ManagerRegistryGetManagerToEntityManagerRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php', 'Rector\\Doctrine\\Rector\\Class_\\MoveCurrentDateTimeDefaultInEntityToConstructorRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\MoveRepositoryFromParentToConstructorRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\RemoveEmptyTableAttributeRector' => $vendorDir . '/rector/rector-doctrine/src/Rector/Class_/RemoveEmptyTableAttributeRector.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index b6354297065..764b01aea0e 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit7977ba338c257f0b70710b3404e69e00 +class ComposerAutoloaderInitf1683014dc82e46c87167ac2cba04155 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit7977ba338c257f0b70710b3404e69e00 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit7977ba338c257f0b70710b3404e69e00', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitf1683014dc82e46c87167ac2cba04155', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit7977ba338c257f0b70710b3404e69e00', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitf1683014dc82e46c87167ac2cba04155', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit7977ba338c257f0b70710b3404e69e00::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitf1683014dc82e46c87167ac2cba04155::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit7977ba338c257f0b70710b3404e69e00::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitf1683014dc82e46c87167ac2cba04155::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 536fc9b8008..3c79b7cd043 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit7977ba338c257f0b70710b3404e69e00 +class ComposerStaticInitf1683014dc82e46c87167ac2cba04155 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -1885,7 +1885,6 @@ class ComposerStaticInit7977ba338c257f0b70710b3404e69e00 'Rector\\Doctrine\\NodeAnalyzer\\AttrinationFinder' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/AttrinationFinder.php', 'Rector\\Doctrine\\NodeAnalyzer\\ConstructorAssignPropertyAnalyzer' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/ConstructorAssignPropertyAnalyzer.php', 'Rector\\Doctrine\\NodeAnalyzer\\EntityObjectTypeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/EntityObjectTypeResolver.php', - 'Rector\\Doctrine\\NodeAnalyzer\\MethodCallNameOnTypeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/MethodCallNameOnTypeResolver.php', 'Rector\\Doctrine\\NodeAnalyzer\\SetterClassMethodAnalyzer' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/SetterClassMethodAnalyzer.php', 'Rector\\Doctrine\\NodeAnalyzer\\TargetEntityResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeAnalyzer/TargetEntityResolver.php', 'Rector\\Doctrine\\NodeFactory\\ArrayCollectionAssignFactory' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeFactory/ArrayCollectionAssignFactory.php', @@ -1898,7 +1897,6 @@ class ComposerStaticInit7977ba338c257f0b70710b3404e69e00 'Rector\\Doctrine\\NodeFactory\\ValueAssignFactory' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeFactory/ValueAssignFactory.php', 'Rector\\Doctrine\\NodeManipulator\\ColumnPropertyTypeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/ColumnPropertyTypeResolver.php', 'Rector\\Doctrine\\NodeManipulator\\ConstructorManipulator' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/ConstructorManipulator.php', - 'Rector\\Doctrine\\NodeManipulator\\DependencyRemover' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/DependencyRemover.php', 'Rector\\Doctrine\\NodeManipulator\\DoctrineItemDefaultValueManipulator' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/DoctrineItemDefaultValueManipulator.php', 'Rector\\Doctrine\\NodeManipulator\\IssetDimFetchCleaner' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/IssetDimFetchCleaner.php', 'Rector\\Doctrine\\NodeManipulator\\NullabilityColumnPropertyTypeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/NodeManipulator/NullabilityColumnPropertyTypeResolver.php', @@ -1913,7 +1911,6 @@ class ComposerStaticInit7977ba338c257f0b70710b3404e69e00 'Rector\\Doctrine\\Rector\\Class_\\AddEntityIdByConditionRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php', 'Rector\\Doctrine\\Rector\\Class_\\ClassAnnotationToNamedArgumentConstructorRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\InitializeDefaultEntityCollectionRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php', - 'Rector\\Doctrine\\Rector\\Class_\\ManagerRegistryGetManagerToEntityManagerRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php', 'Rector\\Doctrine\\Rector\\Class_\\MoveCurrentDateTimeDefaultInEntityToConstructorRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\MoveRepositoryFromParentToConstructorRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php', 'Rector\\Doctrine\\Rector\\Class_\\RemoveEmptyTableAttributeRector' => __DIR__ . '/..' . '/rector/rector-doctrine/src/Rector/Class_/RemoveEmptyTableAttributeRector.php', @@ -3086,9 +3083,9 @@ class ComposerStaticInit7977ba338c257f0b70710b3404e69e00 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit7977ba338c257f0b70710b3404e69e00::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit7977ba338c257f0b70710b3404e69e00::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit7977ba338c257f0b70710b3404e69e00::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitf1683014dc82e46c87167ac2cba04155::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitf1683014dc82e46c87167ac2cba04155::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitf1683014dc82e46c87167ac2cba04155::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3e4eb11af89..18e5e285b82 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1855,20 +1855,17 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git", - "reference": "bc6805cc485416b82f0e6fb09f815f07e083f8ba" + "reference": "cafabaf07ebd7a6ff5e69abe2c99b7ab277fdee6" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/bc6805cc485416b82f0e6fb09f815f07e083f8ba", - "reference": "bc6805cc485416b82f0e6fb09f815f07e083f8ba", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/cafabaf07ebd7a6ff5e69abe2c99b7ab277fdee6", + "reference": "cafabaf07ebd7a6ff5e69abe2c99b7ab277fdee6", "shasum": "" }, "require": { "php": ">=8.1" }, - "conflict": { - "rector\/rector": "<0.11" - }, "require-dev": { "doctrine\/orm": "^2.10", "phpstan\/extension-installer": "^1.1", @@ -1877,24 +1874,22 @@ "phpstan\/phpstan-webmozart-assert": "^1.0", "phpunit\/phpunit": "^10.0", "rector\/phpstan-rules": "^0.6", - "rector\/rector-debugging": "dev-main", - "rector\/rector-generator": "^0.6.10", + "rector\/rector-generator": "^0.6", "rector\/rector-src": "dev-main", "symplify\/easy-ci": "^11.2", "symplify\/easy-coding-standard": "^11.2", "symplify\/phpstan-extensions": "^11.1", "symplify\/phpstan-rules": "^11.1", "symplify\/rule-doc-generator": "^11.1", - "symplify\/vendor-patches": "^11.1" + "symplify\/vendor-patches": "^11.1", + "tomasvotruba\/type-coverage": "^0.2.0", + "tomasvotruba\/unused-public": "^0.1.10" }, - "time": "2023-05-26T23:58:12+00:00", + "time": "2023-05-29T08:18:21+00:00", "default-branch": true, "type": "rector-extension", "extra": { "enable-patching": true, - "branch-alias": { - "dev-main": "0.11-dev" - }, "rector": { "includes": [ "config\/config.php" @@ -1992,12 +1987,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git", - "reference": "659f0153a4de3c48fa6da7cc755679d74bb9f26d" + "reference": "edbdd0e70f2a99e163e3c9b675ffb4c743bc8cb7" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/659f0153a4de3c48fa6da7cc755679d74bb9f26d", - "reference": "659f0153a4de3c48fa6da7cc755679d74bb9f26d", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/edbdd0e70f2a99e163e3c9b675ffb4c743bc8cb7", + "reference": "edbdd0e70f2a99e163e3c9b675ffb4c743bc8cb7", "shasum": "" }, "require": { @@ -2026,7 +2021,7 @@ "tomasvotruba\/type-coverage": "^0.1", "tomasvotruba\/unused-public": "^0.1" }, - "time": "2023-05-28T14:09:34+00:00", + "time": "2023-05-29T08:30:48+00:00", "default-branch": true, "type": "rector-extension", "extra": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 5bba754ddef..ffade154972 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202305; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.15.x-dev'), '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.0', 'version' => '3.1.0.0', 'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.6', 'version' => '2.0.6.0', 'reference' => 'd9d313a36c872fd6ee06d9a6cbcf713eaa40f024', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '0.5.1', 'version' => '0.5.1.0', 'reference' => 'b58e5a3933e541dc286cc91fc4f3898bbc6f1623', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '372d945c156ee7f35c953339fb164538339e6283', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.9', 'version' => '3.2.9.0', 'reference' => 'c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.5', 'version' => '4.15.5.0', 'reference' => '11e2663a5bc9db5d714eedb4277ee300403b4a9e', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.21.0', 'version' => '1.21.0.0', 'reference' => '6df62b08faef4f899772bc7c3bbabb93d2b7a21c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.15', 'version' => '1.10.15.0', 'reference' => '762c4dac4da6f8756eebb80e528c3a47855da9bd', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), '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/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), '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')), '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.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '6e7e587714fff7a83dcc7025aee42ab3b265ae05', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.10.0', 'version' => '2.10.0.0', 'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', '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 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'bc6805cc485416b82f0e6fb09f815f07e083f8ba', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'abf0a7f8f648c934a688bb99f35edb50f9291856', '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' => '659f0153a4de3c48fa6da7cc755679d74bb9f26d', '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(0 => '0.15.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3878c8837ef2ca76b58601a3132f7da9ae87c044', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.0.3', 'version' => '5.0.3.0', 'reference' => '912dc2fbe3e3c1e7873313cc801b100b6c68c87b', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/config' => array('pretty_version' => 'v6.2.7', 'version' => '6.2.7.0', 'reference' => '249271da6f545d6579e0663374f8249a80be2893', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.2.11', 'version' => '6.2.11.0', 'reference' => '5aa03db8ef0a5457c316ec580e69562d97734c77', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.2.1', 'version' => '3.2.1.0', 'reference' => '8ec95320f72fd012bf6335498c8f6c8d64957346', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.12', 'version' => '6.1.12.0', 'reference' => '360c9d0948e1fe675336346d5862e8e55b378d90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.2.10', 'version' => '6.2.10.0', 'reference' => 'fd588debf7d1bc16a2c84b4b3b71145d9946b894', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.2.7', 'version' => '6.2.7.0', 'reference' => '20808dc6631aecafbe67c186af5dcb370be3a0eb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.2.11', 'version' => '6.2.11.0', 'reference' => '97ae9721bead9d1a39b5650e2f4b7834b93b539c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.2.8', 'version' => '6.2.8.0', 'reference' => '193e83bbd6617d6b2151c37fff10fa7168ebddef', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.27', 'version' => '11.1.27.0', 'reference' => '28911142f6a0f4127271f745e2403bb84fcd2b87', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.10.2', 'version' => '2.10.2.0', 'reference' => '882fee7cf4258a602ad4a37461e837ed2ca1406b', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', '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(0 => '0.15.x-dev'), '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.0', 'version' => '3.1.0.0', 'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.6', 'version' => '2.0.6.0', 'reference' => 'd9d313a36c872fd6ee06d9a6cbcf713eaa40f024', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '0.5.1', 'version' => '0.5.1.0', 'reference' => 'b58e5a3933e541dc286cc91fc4f3898bbc6f1623', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '372d945c156ee7f35c953339fb164538339e6283', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.9', 'version' => '3.2.9.0', 'reference' => 'c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.5', 'version' => '4.15.5.0', 'reference' => '11e2663a5bc9db5d714eedb4277ee300403b4a9e', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.21.0', 'version' => '1.21.0.0', 'reference' => '6df62b08faef4f899772bc7c3bbabb93d2b7a21c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.15', 'version' => '1.10.15.0', 'reference' => '762c4dac4da6f8756eebb80e528c3a47855da9bd', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), '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/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), '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')), '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.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '6e7e587714fff7a83dcc7025aee42ab3b265ae05', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.10.0', 'version' => '2.10.0.0', 'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', '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 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'cafabaf07ebd7a6ff5e69abe2c99b7ab277fdee6', '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' => 'abf0a7f8f648c934a688bb99f35edb50f9291856', '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' => 'edbdd0e70f2a99e163e3c9b675ffb4c743bc8cb7', '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(0 => '0.15.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3878c8837ef2ca76b58601a3132f7da9ae87c044', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.0.3', 'version' => '5.0.3.0', 'reference' => '912dc2fbe3e3c1e7873313cc801b100b6c68c87b', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/config' => array('pretty_version' => 'v6.2.7', 'version' => '6.2.7.0', 'reference' => '249271da6f545d6579e0663374f8249a80be2893', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.2.11', 'version' => '6.2.11.0', 'reference' => '5aa03db8ef0a5457c316ec580e69562d97734c77', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.2.1', 'version' => '3.2.1.0', 'reference' => '8ec95320f72fd012bf6335498c8f6c8d64957346', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.12', 'version' => '6.1.12.0', 'reference' => '360c9d0948e1fe675336346d5862e8e55b378d90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.2.10', 'version' => '6.2.10.0', 'reference' => 'fd588debf7d1bc16a2c84b4b3b71145d9946b894', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.2.7', 'version' => '6.2.7.0', 'reference' => '20808dc6631aecafbe67c186af5dcb370be3a0eb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.2.11', 'version' => '6.2.11.0', 'reference' => '97ae9721bead9d1a39b5650e2f4b7834b93b539c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.2.8', 'version' => '6.2.8.0', 'reference' => '193e83bbd6617d6b2151c37fff10fa7168ebddef', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.1')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.27', 'version' => '11.1.27.0', 'reference' => '28911142f6a0f4127271f745e2403bb84fcd2b87', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.10.2', 'version' => '2.10.2.0', 'reference' => '882fee7cf4258a602ad4a37461e837ed2ca1406b', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', '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))); diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index bc952128348..6222e2e9550 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-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' => 'dev-main bc6805c'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main abf0a7f'), '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' => 'dev-main 659f015'), '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' => 'dev-main 3878c88')); + public const EXTENSIONS = array('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' => 'dev-main cafabaf'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main abf0a7f'), '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' => 'dev-main edbdd0e'), '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' => 'dev-main 3878c88')); private function __construct() { } diff --git a/vendor/rector/rector-doctrine/composer.json b/vendor/rector/rector-doctrine/composer.json index 5d90a752b05..9e170772d5d 100644 --- a/vendor/rector/rector-doctrine/composer.json +++ b/vendor/rector/rector-doctrine/composer.json @@ -20,9 +20,10 @@ "phpstan\/phpstan-webmozart-assert": "^1.0", "phpstan\/phpstan-strict-rules": "^1.1", "symplify\/vendor-patches": "^11.1", - "rector\/rector-generator": "^0.6.10", - "rector\/rector-debugging": "dev-main", - "symplify\/easy-ci": "^11.2" + "rector\/rector-generator": "^0.6", + "symplify\/easy-ci": "^11.2", + "tomasvotruba\/unused-public": "^0.1.10", + "tomasvotruba\/type-coverage": "^0.2.0" }, "autoload": { "psr-4": { @@ -47,23 +48,16 @@ }, "extra": { "enable-patching": true, - "branch-alias": { - "dev-main": "0.11-dev" - }, "rector": { "includes": [ "config\/config.php" ] } }, - "conflict": { - "rector\/rector": "<0.11" - }, "minimum-stability": "dev", "prefer-stable": true, "config": { "allow-plugins": { - "composer\/package-versions-deprecated": false, "cweagans\/composer-patches": true, "rector\/extension-installer": true, "phpstan\/extension-installer": true diff --git a/vendor/rector/rector-doctrine/config/sets/doctrine-code-quality.php b/vendor/rector/rector-doctrine/config/sets/doctrine-code-quality.php index e6fd1fce970..4995c3ad3df 100644 --- a/vendor/rector/rector-doctrine/config/sets/doctrine-code-quality.php +++ b/vendor/rector/rector-doctrine/config/sets/doctrine-code-quality.php @@ -5,7 +5,6 @@ namespace RectorPrefix202305; use Rector\Config\RectorConfig; use Rector\Doctrine\Rector\Class_\InitializeDefaultEntityCollectionRector; -use Rector\Doctrine\Rector\Class_\ManagerRegistryGetManagerToEntityManagerRector; use Rector\Doctrine\Rector\Class_\MoveCurrentDateTimeDefaultInEntityToConstructorRector; use Rector\Doctrine\Rector\Class_\RemoveEmptyTableAttributeRector; use Rector\Doctrine\Rector\Class_\RemoveRedundantDefaultClassAnnotationValuesRector; @@ -22,21 +21,22 @@ use Rector\Doctrine\Rector\Property\TypedPropertyFromToOneRelationTypeRector; use Rector\Transform\Rector\Attribute\AttributeKeyToClassConstFetchRector; use Rector\Transform\ValueObject\AttributeKeyToClassConstFetch; return static function (RectorConfig $rectorConfig) : void { - $rectorConfig->rule(ManagerRegistryGetManagerToEntityManagerRector::class); - $rectorConfig->rule(InitializeDefaultEntityCollectionRector::class); - $rectorConfig->rule(MakeEntitySetterNullabilityInSyncWithPropertyRector::class); - $rectorConfig->rule(MakeEntityDateTimePropertyDateTimeInterfaceRector::class); - $rectorConfig->rule(MoveCurrentDateTimeDefaultInEntityToConstructorRector::class); - $rectorConfig->rule(CorrectDefaultTypesOnEntityPropertyRector::class); - $rectorConfig->rule(ChangeBigIntEntityPropertyToIntTypeRector::class); - $rectorConfig->rule(ImproveDoctrineCollectionDocTypeInEntityRector::class); - $rectorConfig->rule(RemoveRedundantDefaultPropertyAnnotationValuesRector::class); - $rectorConfig->rule(RemoveRedundantDefaultClassAnnotationValuesRector::class); - $rectorConfig->rule(RemoveEmptyTableAttributeRector::class); - // typed properties in entities from annotations/attributes - $rectorConfig->rule(TypedPropertyFromColumnTypeRector::class); - $rectorConfig->rule(TypedPropertyFromToOneRelationTypeRector::class); - $rectorConfig->rule(TypedPropertyFromToManyRelationTypeRector::class); - $rectorConfig->rule(TypedPropertyFromDoctrineCollectionRector::class); + $rectorConfig->rules([ + InitializeDefaultEntityCollectionRector::class, + MakeEntitySetterNullabilityInSyncWithPropertyRector::class, + MakeEntityDateTimePropertyDateTimeInterfaceRector::class, + MoveCurrentDateTimeDefaultInEntityToConstructorRector::class, + CorrectDefaultTypesOnEntityPropertyRector::class, + ChangeBigIntEntityPropertyToIntTypeRector::class, + ImproveDoctrineCollectionDocTypeInEntityRector::class, + RemoveRedundantDefaultPropertyAnnotationValuesRector::class, + RemoveRedundantDefaultClassAnnotationValuesRector::class, + RemoveEmptyTableAttributeRector::class, + // typed properties in entities from annotations/attributes + TypedPropertyFromColumnTypeRector::class, + TypedPropertyFromToOneRelationTypeRector::class, + TypedPropertyFromToManyRelationTypeRector::class, + TypedPropertyFromDoctrineCollectionRector::class, + ]); $rectorConfig->ruleWithConfiguration(AttributeKeyToClassConstFetchRector::class, [new AttributeKeyToClassConstFetch('Doctrine\\ORM\\Mapping\\Column', 'type', 'Doctrine\\DBAL\\Types\\Types', ['array' => 'ARRAY', 'ascii_string' => 'ASCII_STRING', 'bigint' => 'BIGINT', 'binary' => 'BINARY', 'blob' => 'BLOB', 'boolean' => 'BOOLEAN', 'date' => 'DATE_MUTABLE', 'date_immutable' => 'DATE_IMMUTABLE', 'dateinterval' => 'DATEINTERVAL', 'datetime' => 'DATETIME_MUTABLE', 'datetime_immutable' => 'DATETIME_IMMUTABLE', 'datetimetz' => 'DATETIMETZ_MUTABLE', 'datetimetz_immutable' => 'DATETIMETZ_IMMUTABLE', 'decimal' => 'DECIMAL', 'float' => 'FLOAT', 'guid' => 'GUID', 'integer' => 'INTEGER', 'json' => 'JSON', 'object' => 'OBJECT', 'simple_array' => 'SIMPLE_ARRAY', 'smallint' => 'SMALLINT', 'string' => 'STRING', 'text' => 'TEXT', 'time' => 'TIME_MUTABLE', 'time_immutable' => 'TIME_IMMUTABLE'])]); }; diff --git a/vendor/rector/rector-doctrine/src/NodeAnalyzer/MethodCallNameOnTypeResolver.php b/vendor/rector/rector-doctrine/src/NodeAnalyzer/MethodCallNameOnTypeResolver.php deleted file mode 100644 index 4db54d0f957..00000000000 --- a/vendor/rector/rector-doctrine/src/NodeAnalyzer/MethodCallNameOnTypeResolver.php +++ /dev/null @@ -1,57 +0,0 @@ -nodeNameResolver = $nodeNameResolver; - $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; - $this->nodeTypeResolver = $nodeTypeResolver; - } - /** - * @return string[] - */ - public function resolve(Class_ $class, ObjectType $objectType) : array - { - $methodNames = []; - $this->simpleCallableNodeTraverser->traverseNodesWithCallable($class, function (Node $node) use(&$methodNames, $objectType) { - if (!$node instanceof MethodCall) { - return null; - } - if (!$this->nodeTypeResolver->isObjectType($node->var, $objectType)) { - return null; - } - $name = $this->nodeNameResolver->getName($node->name); - if ($name === null) { - return null; - } - $methodNames[] = $name; - }); - return \array_unique($methodNames); - } -} diff --git a/vendor/rector/rector-doctrine/src/NodeManipulator/DependencyRemover.php b/vendor/rector/rector-doctrine/src/NodeManipulator/DependencyRemover.php deleted file mode 100644 index c4e32b07af3..00000000000 --- a/vendor/rector/rector-doctrine/src/NodeManipulator/DependencyRemover.php +++ /dev/null @@ -1,91 +0,0 @@ -nodeNameResolver = $nodeNameResolver; - $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; - $this->nodeRemover = $nodeRemover; - } - public function removeByType(Class_ $class, ClassMethod $classMethod, Param $registryParam, string $type) : void - { - // remove constructor param: $managerRegistry - foreach ($classMethod->params as $key => $param) { - if ($param->type === null) { - continue; - } - if (!$this->nodeNameResolver->isName($param->type, $type)) { - continue; - } - unset($classMethod->params[$key]); - } - $this->removeRegistryDependencyAssign($class, $classMethod, $registryParam); - } - private function removeRegistryDependencyAssign(Class_ $class, ClassMethod $classMethod, Param $registryParam) : void - { - foreach ((array) $classMethod->stmts as $constructorMethodStmt) { - if (!$constructorMethodStmt instanceof Expression) { - continue; - } - if (!$constructorMethodStmt->expr instanceof Assign) { - continue; - } - /** @var Assign $assign */ - $assign = $constructorMethodStmt->expr; - if (!$this->nodeNameResolver->areNamesEqual($assign->expr, $registryParam->var)) { - continue; - } - $this->removeManagerRegistryProperty($class, $assign); - // remove assign - $this->nodeRemover->removeNodeFromStatements($classMethod, $constructorMethodStmt); - break; - } - } - private function removeManagerRegistryProperty(Class_ $class, Assign $assign) : void - { - $removedPropertyName = $this->nodeNameResolver->getName($assign->var); - if ($removedPropertyName === null) { - return; - } - $this->simpleCallableNodeTraverser->traverseNodesWithCallable($class->stmts, function (Node $node) use($removedPropertyName) : ?int { - if (!$node instanceof Property) { - return null; - } - if (!$this->nodeNameResolver->isName($node, $removedPropertyName)) { - return null; - } - $this->nodeRemover->removeNode($node); - return NodeTraverser::STOP_TRAVERSAL; - }); - } -} diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php deleted file mode 100644 index b18e8dcc7d9..00000000000 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php +++ /dev/null @@ -1,225 +0,0 @@ -methodCallNameOnTypeResolver = $methodCallNameOnTypeResolver; - $this->dependencyRemover = $dependencyRemover; - $this->propertyToAddCollector = $propertyToAddCollector; - $this->phpVersionProvider = $phpVersionProvider; - } - public function getRuleDefinition() : RuleDefinition - { - return new RuleDefinition('Changes ManagerRegistry intermediate calls directly to EntityManager calls', [new CodeSample(<<<'CODE_SAMPLE' -use Doctrine\Common\Persistence\ManagerRegistry; - -class CustomRepository -{ - /** - * @var ManagerRegistry - */ - private $managerRegistry; - - public function __construct(ManagerRegistry $managerRegistry) - { - $this->managerRegistry = $managerRegistry; - } - - public function run() - { - $entityManager = $this->managerRegistry->getManager(); - $someRepository = $entityManager->getRepository('Some'); - } -} -CODE_SAMPLE -, <<<'CODE_SAMPLE' -use Doctrine\ORM\EntityManagerInterface; - -class CustomRepository -{ - /** - * @var EntityManagerInterface - */ - private $entityManager; - - public function __construct(EntityManagerInterface $entityManager) - { - $this->entityManager = $entityManager; - } - - public function run() - { - $someRepository = $this->entityManager->getRepository('Some'); - } -} -CODE_SAMPLE -)]); - } - /** - * @return array> - */ - public function getNodeTypes() : array - { - return [Class_::class]; - } - /** - * @param Class_ $node - */ - public function refactor(Node $node) : ?Node - { - $constructorClassMethod = $node->getMethod(MethodName::CONSTRUCT); - if (!$constructorClassMethod instanceof ClassMethod) { - return null; - } - // collect on registry method calls, so we know if the manager registry is needed - $registryCalledMethods = $this->methodCallNameOnTypeResolver->resolve($node, new ObjectType('Doctrine\\Common\\Persistence\\ManagerRegistry')); - if (!\in_array(self::GET_MANAGER, $registryCalledMethods, \true)) { - return null; - } - $managerRegistryParam = $this->resolveManagerRegistryParam($constructorClassMethod); - // no registry manager in the constructor - if (!$managerRegistryParam instanceof Param) { - return null; - } - if ($registryCalledMethods === [self::GET_MANAGER]) { - // the manager registry is needed only get entity manager → we don't need it now - $this->removeManagerRegistryDependency($node, $constructorClassMethod, $managerRegistryParam); - } - $this->replaceEntityRegistryVariableWithEntityManagerProperty($node); - $this->removeAssignGetRepositoryCalls($node); - // add entity manager via constructor - $this->addConstructorDependencyWithProperty($node, $constructorClassMethod, self::ENTITY_MANAGER, new FullyQualifiedObjectType('Doctrine\\ORM\\EntityManagerInterface')); - return $node; - } - private function resolveManagerRegistryParam(ClassMethod $classMethod) : ?Param - { - foreach ($classMethod->params as $param) { - if ($param->type === null) { - continue; - } - if (!$this->isName($param->type, 'Doctrine\\Common\\Persistence\\ManagerRegistry')) { - continue; - } - return $param; - } - return null; - } - private function removeManagerRegistryDependency(Class_ $class, ClassMethod $classMethod, Param $registryParam) : void - { - // remove constructor param: $managerRegistry - foreach ($classMethod->params as $key => $param) { - if ($param->type === null) { - continue; - } - if (!$this->isName($param->type, 'Doctrine\\Common\\Persistence\\ManagerRegistry')) { - continue; - } - unset($classMethod->params[$key]); - } - $this->dependencyRemover->removeByType($class, $classMethod, $registryParam, 'Doctrine\\Common\\Persistence\\ManagerRegistry'); - } - /** - * Before: $entityRegistry-> - * - * After: $this->entityManager-> - */ - private function replaceEntityRegistryVariableWithEntityManagerProperty(Class_ $class) : void - { - $this->traverseNodesWithCallable($class->stmts, function (Node $node) : ?PropertyFetch { - if (!$node instanceof Variable) { - return null; - } - if (!$this->isObjectType($node, new ObjectType('Doctrine\\Common\\Persistence\\ObjectManager'))) { - return null; - } - return new PropertyFetch(new Variable('this'), self::ENTITY_MANAGER); - }); - } - private function removeAssignGetRepositoryCalls(Class_ $class) : void - { - $this->traverseNodesWithCallable($class->stmts, function (Node $node) { - if (!$node instanceof Assign) { - return null; - } - if (!$this->isRegistryGetManagerMethodCall($node)) { - return null; - } - $this->removeNode($node); - }); - } - private function addConstructorDependencyWithProperty(Class_ $class, ClassMethod $classMethod, string $name, FullyQualifiedObjectType $fullyQualifiedObjectType) : void - { - if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::PROPERTY_PROMOTION)) { - $assign = $this->nodeFactory->createPropertyAssignment($name); - $classMethod->stmts[] = new Expression($assign); - } - $propertyMetadata = new PropertyMetadata($name, $fullyQualifiedObjectType, Class_::MODIFIER_PRIVATE); - $this->propertyToAddCollector->addPropertyToClass($class, $propertyMetadata); - } - private function isRegistryGetManagerMethodCall(Assign $assign) : bool - { - if (!$assign->expr instanceof MethodCall) { - return \false; - } - if (!$this->isObjectType($assign->expr->var, new ObjectType('Doctrine\\Common\\Persistence\\ManagerRegistry'))) { - return \false; - } - return $this->isName($assign->expr->name, self::GET_MANAGER); - } -} diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php index aae3cf45fd0..97820bdc498 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php @@ -99,14 +99,13 @@ CODE_SAMPLE if ($proccesed === null) { continue; } - /** @var int $key */ - $this->nodeRemover->removeStmt($node, $key); + unset($node->stmts[$key]); } - $node->stmts = \array_merge((array) $node->stmts, (array) $proccesed); + $node->stmts = \array_merge($node->stmts, $proccesed); return $node; } /** - * @return Expression[]|null + * @return Node\Stmt[]|null */ private function processTryCatch(TryCatch $tryCatch) : ?array {