diff --git a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php index 602ac353227..77af16a3786 100644 --- a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php +++ b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php @@ -111,6 +111,9 @@ CODE_SAMPLE private function doesLastStatementBreakFlow($node) : bool { $lastStmt = \end($node->stmts); + if ($lastStmt instanceof If_ && $lastStmt->else instanceof Else_) { + return $this->doesLastStatementBreakFlow($lastStmt); + } return !($lastStmt instanceof Return_ || $lastStmt instanceof Throw_ || $lastStmt instanceof Continue_ || $lastStmt instanceof Expression && $lastStmt->expr instanceof Exit_); } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 7c954d8bc0b..1876031c147 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -17,12 +17,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '837c2262f13e5b8faffdb02c5d9fb701d581fa61'; + public const PACKAGE_VERSION = '54feb0dcfaeaafe177d1268ca2117a7fb1a7da1a'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-08-23 18:13:34'; + public const RELEASE_DATE = '2022-08-23 22:51:27'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 47913ea61f6..6424c0f72c4 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf::getLoader(); +return ComposerAutoloaderInit69e209859c8d2ffdd1c1988871642314::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index f93728fa197..06757c21119 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2615,6 +2615,7 @@ return array( 'Rector\\Symfony\\Contract\\EventReferenceToMethodNameInterface' => $vendorDir . '/rector/rector-symfony/src/Contract/EventReferenceToMethodNameInterface.php', 'Rector\\Symfony\\Contract\\Tag\\TagInterface' => $vendorDir . '/rector/rector-symfony/src/Contract/Tag/TagInterface.php', 'Rector\\Symfony\\DataProvider\\ServiceMapProvider' => $vendorDir . '/rector/rector-symfony/src/DataProvider/ServiceMapProvider.php', + 'Rector\\Symfony\\DataProvider\\ServiceNameToTypeUniqueProvider' => $vendorDir . '/rector/rector-symfony/src/DataProvider/ServiceNameToTypeUniqueProvider.php', 'Rector\\Symfony\\Enum\\SymfonyAnnotation' => $vendorDir . '/rector/rector-symfony/src/Enum/SymfonyAnnotation.php', 'Rector\\Symfony\\Exception\\InvalidConfigurationException' => $vendorDir . '/rector/rector-symfony/src/Exception/InvalidConfigurationException.php', 'Rector\\Symfony\\Exception\\XmlContainerNotExistsException' => $vendorDir . '/rector/rector-symfony/src/Exception/XmlContainerNotExistsException.php', @@ -2636,6 +2637,7 @@ return array( 'Rector\\Symfony\\NodeAnalyzer\\RouteRequiredParamNameToTypesResolver' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php', 'Rector\\Symfony\\NodeAnalyzer\\ServiceTypeMethodCallResolver' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/ServiceTypeMethodCallResolver.php', 'Rector\\Symfony\\NodeAnalyzer\\SymfonyControllerFilter' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyControllerFilter.php', + 'Rector\\Symfony\\NodeAnalyzer\\SymfonyPhpClosureDetector' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php', 'Rector\\Symfony\\NodeAnalyzer\\SymfonyTestCaseAnalyzer' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyTestCaseAnalyzer.php', 'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationFromNewFactory' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationFromNewFactory.php', 'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationKeyToValuesResolver' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationKeyToValuesResolver.php', @@ -2682,6 +2684,7 @@ return array( 'Rector\\Symfony\\Rector\\Class_\\LogoutSuccessHandlerToLogoutEventSubscriberRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php', 'Rector\\Symfony\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php', 'Rector\\Symfony\\Rector\\Class_\\MakeCommandLazyRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php', + 'Rector\\Symfony\\Rector\\Closure\\ServiceSetStringNameToClassNameRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php', 'Rector\\Symfony\\Rector\\ConstFetch\\ConstraintUrlOptionRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php', 'Rector\\Symfony\\Rector\\FuncCall\\ReplaceServiceArgumentRector' => $vendorDir . '/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\AddViolationToBuildViolationRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/AddViolationToBuildViolationRector.php', @@ -2705,7 +2708,6 @@ return array( 'Rector\\Symfony\\Rector\\MethodCall\\ReadOnlyOptionToAttributeRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\RedirectToRouteRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\ReflectionExtractorEnableMagicCallExtractorRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php', - 'Rector\\Symfony\\Rector\\MethodCall\\ServiceSetStringNameToClassNameRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\StringFormTypeToClassRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\SwiftCreateMessageToNewEmailRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\SwiftSetBodyToHtmlPlainMethodCallRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index f0586612184..871b1ebf836 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf +class ComposerAutoloaderInit69e209859c8d2ffdd1c1988871642314 { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit69e209859c8d2ffdd1c1988871642314', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit69e209859c8d2ffdd1c1988871642314', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit056fb7a41d9848c9734584959af9dabf::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit69e209859c8d2ffdd1c1988871642314::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit056fb7a41d9848c9734584959af9dabf::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit69e209859c8d2ffdd1c1988871642314::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire056fb7a41d9848c9734584959af9dabf($fileIdentifier, $file); + composerRequire69e209859c8d2ffdd1c1988871642314($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit056fb7a41d9848c9734584959af9dabf * @param string $file * @return void */ -function composerRequire056fb7a41d9848c9734584959af9dabf($fileIdentifier, $file) +function composerRequire69e209859c8d2ffdd1c1988871642314($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 c30f902358b..4879611db5d 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit056fb7a41d9848c9734584959af9dabf +class ComposerStaticInit69e209859c8d2ffdd1c1988871642314 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -2912,6 +2912,7 @@ class ComposerStaticInit056fb7a41d9848c9734584959af9dabf 'Rector\\Symfony\\Contract\\EventReferenceToMethodNameInterface' => __DIR__ . '/..' . '/rector/rector-symfony/src/Contract/EventReferenceToMethodNameInterface.php', 'Rector\\Symfony\\Contract\\Tag\\TagInterface' => __DIR__ . '/..' . '/rector/rector-symfony/src/Contract/Tag/TagInterface.php', 'Rector\\Symfony\\DataProvider\\ServiceMapProvider' => __DIR__ . '/..' . '/rector/rector-symfony/src/DataProvider/ServiceMapProvider.php', + 'Rector\\Symfony\\DataProvider\\ServiceNameToTypeUniqueProvider' => __DIR__ . '/..' . '/rector/rector-symfony/src/DataProvider/ServiceNameToTypeUniqueProvider.php', 'Rector\\Symfony\\Enum\\SymfonyAnnotation' => __DIR__ . '/..' . '/rector/rector-symfony/src/Enum/SymfonyAnnotation.php', 'Rector\\Symfony\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/rector/rector-symfony/src/Exception/InvalidConfigurationException.php', 'Rector\\Symfony\\Exception\\XmlContainerNotExistsException' => __DIR__ . '/..' . '/rector/rector-symfony/src/Exception/XmlContainerNotExistsException.php', @@ -2933,6 +2934,7 @@ class ComposerStaticInit056fb7a41d9848c9734584959af9dabf 'Rector\\Symfony\\NodeAnalyzer\\RouteRequiredParamNameToTypesResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php', 'Rector\\Symfony\\NodeAnalyzer\\ServiceTypeMethodCallResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/ServiceTypeMethodCallResolver.php', 'Rector\\Symfony\\NodeAnalyzer\\SymfonyControllerFilter' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyControllerFilter.php', + 'Rector\\Symfony\\NodeAnalyzer\\SymfonyPhpClosureDetector' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php', 'Rector\\Symfony\\NodeAnalyzer\\SymfonyTestCaseAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyTestCaseAnalyzer.php', 'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationFromNewFactory' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationFromNewFactory.php', 'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationKeyToValuesResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationKeyToValuesResolver.php', @@ -2979,6 +2981,7 @@ class ComposerStaticInit056fb7a41d9848c9734584959af9dabf 'Rector\\Symfony\\Rector\\Class_\\LogoutSuccessHandlerToLogoutEventSubscriberRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php', 'Rector\\Symfony\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php', 'Rector\\Symfony\\Rector\\Class_\\MakeCommandLazyRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php', + 'Rector\\Symfony\\Rector\\Closure\\ServiceSetStringNameToClassNameRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php', 'Rector\\Symfony\\Rector\\ConstFetch\\ConstraintUrlOptionRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php', 'Rector\\Symfony\\Rector\\FuncCall\\ReplaceServiceArgumentRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\AddViolationToBuildViolationRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/AddViolationToBuildViolationRector.php', @@ -3002,7 +3005,6 @@ class ComposerStaticInit056fb7a41d9848c9734584959af9dabf 'Rector\\Symfony\\Rector\\MethodCall\\ReadOnlyOptionToAttributeRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\RedirectToRouteRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\ReflectionExtractorEnableMagicCallExtractorRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php', - 'Rector\\Symfony\\Rector\\MethodCall\\ServiceSetStringNameToClassNameRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\StringFormTypeToClassRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\SwiftCreateMessageToNewEmailRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php', 'Rector\\Symfony\\Rector\\MethodCall\\SwiftSetBodyToHtmlPlainMethodCallRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php', @@ -3256,9 +3258,9 @@ class ComposerStaticInit056fb7a41d9848c9734584959af9dabf public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit056fb7a41d9848c9734584959af9dabf::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit056fb7a41d9848c9734584959af9dabf::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit056fb7a41d9848c9734584959af9dabf::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit69e209859c8d2ffdd1c1988871642314::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit69e209859c8d2ffdd1c1988871642314::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit69e209859c8d2ffdd1c1988871642314::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 502928e2900..54b3fdece32 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2267,12 +2267,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-symfony.git", - "reference": "ef4b9355148fefeca939b760aae968de93a51f78" + "reference": "66ecf4c7ff9406889e15ef3c6240abeaf82e1859" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/ef4b9355148fefeca939b760aae968de93a51f78", - "reference": "ef4b9355148fefeca939b760aae968de93a51f78", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/66ecf4c7ff9406889e15ef3c6240abeaf82e1859", + "reference": "66ecf4c7ff9406889e15ef3c6240abeaf82e1859", "shasum": "" }, "require": { @@ -2301,7 +2301,7 @@ "symplify\/rule-doc-generator": "^11.1", "symplify\/vendor-patches": "^11.1" }, - "time": "2022-08-20T20:49:11+00:00", + "time": "2022-08-23T19:02:52+00:00", "default-branch": true, "type": "rector-extension", "extra": { @@ -2328,7 +2328,7 @@ "description": "Rector upgrades rules for Symfony Framework", "support": { "issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues", - "source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/main" + "source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.13.1" }, "install-path": "..\/rector\/rector-symfony" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d753f907599..6d7e29cc00b 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202208; -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.13.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', '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.4', 'version' => '2.0.4.0', 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', '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), 'nette/utils' => array('pretty_version' => 'v3.2.7', 'version' => '3.2.7.0', 'reference' => '0af4e3de4df9f1543534beab255ccf459e7a2c99', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.14.0', 'version' => '4.14.0.0', 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', '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.7.0', 'version' => '1.7.0.0', 'reference' => '367a8d9d5f7da2a0136422d27ce8840583926955', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.2', 'version' => '1.8.2.0', 'reference' => 'c53312ecc575caf07b0e90dee43883fdf90ca67c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'reference' => '4a3c437c09075736285d1cabb5c75bf27ed0bc84', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', '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.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.4', 'version' => '0.6.4.0', 'reference' => 'a778f3fb828d68caf8a9ab6567fd8342a86f12fe', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => '6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', '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.11.0', 'version' => '1.11.0.0', 'reference' => 'f474156aaab4f09041144fa8b57c7d70aed32a1c', '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.13.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c2ec06c0b51a41f1469b88539170b94b2bc0b9ef', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'bab14ac969407e3a78ff7515d2bd4c8eefa1a7e9', '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' => 'efc7ddff907a92e57135e6eec8da17957423acfd', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-generator' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '38440b9580b6b1d8859bfb72849753b241a1e39a', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-generator', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '20edb95fcd91239389270534100b2eb9c39cdacc', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3638a6672dab07562bc4dd1bd0c18ced6763d0c2', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '0e0e3991de473fc69dcb73ad6c28db3e3579f828', '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.13.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'ef4b9355148fefeca939b760aae968de93a51f78', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '43fcb5c5966b43c56bcfa481368d90d748936ab8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '079e336a1880f457b219aecc3d41bef2f1093b0b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'c780e677cddda78417fa5187a7c6cd2f21110db9', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.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.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'f35241f45c30bcd9046af2bb200a7086f70e1d6b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/astral' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '7ed6e9a90aa527d0d74c93430c386ab33a92dfc7', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '93efd2a2943d876da270fb09cc29332e29aef09f', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '3bcdeba972fc2c23c6d7bca35b4b358fd821ccd8', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'ba80c5d7367f32c422035a038d0f2a7134c9a68c', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '8830b558de29dddf740d3cfc27643f6af160d033', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '77bda7d7a6d1ffaa1dc0432aafd821d3b51b47ff', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'f4074ed2899e041a2422a70d2d8fb25c9346d0d5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'd8d409e230ce54e04dbad39be20973689c11b237', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'fab027c8135cde323e803353815f6414677dbf66', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '22b34ff41f9da044d58538781a8a524313d65d46', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.9.4', 'version' => '2.9.4.0', 'reference' => '0ed605329b095f5f5fe2db2adc3d1ee80c917294', '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.13.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', '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.4', 'version' => '2.0.4.0', 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', '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), 'nette/utils' => array('pretty_version' => 'v3.2.7', 'version' => '3.2.7.0', 'reference' => '0af4e3de4df9f1543534beab255ccf459e7a2c99', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.14.0', 'version' => '4.14.0.0', 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', '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.7.0', 'version' => '1.7.0.0', 'reference' => '367a8d9d5f7da2a0136422d27ce8840583926955', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.2', 'version' => '1.8.2.0', 'reference' => 'c53312ecc575caf07b0e90dee43883fdf90ca67c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'reference' => '4a3c437c09075736285d1cabb5c75bf27ed0bc84', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', '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.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.4', 'version' => '0.6.4.0', 'reference' => 'a778f3fb828d68caf8a9ab6567fd8342a86f12fe', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => '6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', '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.11.0', 'version' => '1.11.0.0', 'reference' => 'f474156aaab4f09041144fa8b57c7d70aed32a1c', '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.13.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c2ec06c0b51a41f1469b88539170b94b2bc0b9ef', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'bab14ac969407e3a78ff7515d2bd4c8eefa1a7e9', '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' => 'efc7ddff907a92e57135e6eec8da17957423acfd', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-generator' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '38440b9580b6b1d8859bfb72849753b241a1e39a', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-generator', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '20edb95fcd91239389270534100b2eb9c39cdacc', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3638a6672dab07562bc4dd1bd0c18ced6763d0c2', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '0e0e3991de473fc69dcb73ad6c28db3e3579f828', '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.13.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '66ecf4c7ff9406889e15ef3c6240abeaf82e1859', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '43fcb5c5966b43c56bcfa481368d90d748936ab8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '079e336a1880f457b219aecc3d41bef2f1093b0b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'c780e677cddda78417fa5187a7c6cd2f21110db9', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.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.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'f35241f45c30bcd9046af2bb200a7086f70e1d6b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/astral' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '7ed6e9a90aa527d0d74c93430c386ab33a92dfc7', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '93efd2a2943d876da270fb09cc29332e29aef09f', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '3bcdeba972fc2c23c6d7bca35b4b358fd821ccd8', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'ba80c5d7367f32c422035a038d0f2a7134c9a68c', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '8830b558de29dddf740d3cfc27643f6af160d033', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '77bda7d7a6d1ffaa1dc0432aafd821d3b51b47ff', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'f4074ed2899e041a2422a70d2d8fb25c9346d0d5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'd8d409e230ce54e04dbad39be20973689c11b237', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => 'fab027c8135cde323e803353815f6414677dbf66', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '11.1.5', 'version' => '11.1.5.0', 'reference' => '22b34ff41f9da044d58538781a8a524313d65d46', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.9.4', 'version' => '2.9.4.0', 'reference' => '0ed605329b095f5f5fe2db2adc3d1ee80c917294', '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 03f5835b5f1..693b51cc3b9 100644 --- a/vendor/rector/extension-installer/src/GeneratedConfig.php +++ b/vendor/rector/extension-installer/src/GeneratedConfig.php @@ -9,7 +9,7 @@ namespace Rector\RectorInstaller; */ final class GeneratedConfig { - public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c2ec06c'), '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 bab14ac'), '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 efc7ddf'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 38440b9'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 20edb95'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3638a66'), '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 0e0e399'), '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 ef4b935')); + public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c2ec06c'), '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 bab14ac'), '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 efc7ddf'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 38440b9'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 20edb95'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3638a66'), '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 0e0e399'), '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 66ecf4c')); private function __construct() { } diff --git a/vendor/rector/rector-symfony/docs/rector_rules_overview.md b/vendor/rector/rector-symfony/docs/rector_rules_overview.md index cc36267c972..c83ebb87445 100644 --- a/vendor/rector/rector-symfony/docs/rector_rules_overview.md +++ b/vendor/rector/rector-symfony/docs/rector_rules_overview.md @@ -1356,7 +1356,7 @@ Change RouteCollectionBuilder to RoutingConfiguratorRector Change `$service->set()` string names to class-type-based names, to allow `$container->get()` by types in Symfony 2.8 -- class: [`Rector\Symfony\Rector\MethodCall\ServiceSetStringNameToClassNameRector`](../src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php) +- class: [`Rector\Symfony\Rector\Closure\ServiceSetStringNameToClassNameRector`](../src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php) ```diff use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; diff --git a/vendor/rector/rector-symfony/src/DataProvider/ServiceNameToTypeUniqueProvider.php b/vendor/rector/rector-symfony/src/DataProvider/ServiceNameToTypeUniqueProvider.php new file mode 100644 index 00000000000..9bc22f6b5a1 --- /dev/null +++ b/vendor/rector/rector-symfony/src/DataProvider/ServiceNameToTypeUniqueProvider.php @@ -0,0 +1,36 @@ +serviceMapProvider = $serviceMapProvider; + } + /** + * @return array + */ + public function provide() : array + { + $serviceMap = $this->serviceMapProvider->provide(); + $servicesNamesByType = []; + foreach ($serviceMap->getServices() as $serviceDefinition) { + $servicesNamesByType[$serviceDefinition->getClass()][] = $serviceDefinition->getId(); + } + $uniqueServiceNameToType = []; + foreach ($servicesNamesByType as $serviceType => $serviceNames) { + if (\count($serviceNames) > 1) { + continue; + } + $uniqueServiceNameToType[$serviceNames[0]] = $serviceType; + } + return $uniqueServiceNameToType; + } +} diff --git a/vendor/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php b/vendor/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php index 03b2c03ad86..c7b986019d1 100644 --- a/vendor/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php +++ b/vendor/rector/rector-symfony/src/NodeAnalyzer/RouteRequiredParamNameToTypesResolver.php @@ -75,14 +75,14 @@ final class RouteRequiredParamNameToTypesResolver private function resolveFromAnnotation(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) : array { $paramsToRegexes = []; - $requirementsValue = $doctrineAnnotationTagValueNode->getValue('requirements'); - if (!$requirementsValue instanceof ArrayItemNode) { + $requirementsArrayItemNode = $doctrineAnnotationTagValueNode->getValue('requirements'); + if (!$requirementsArrayItemNode instanceof ArrayItemNode) { return []; } - if (!$requirementsValue->value instanceof CurlyListNode) { + if (!$requirementsArrayItemNode->value instanceof CurlyListNode) { return []; } - foreach ($requirementsValue->value->getValuesWithSilentKey() as $nestedArrayItemNode) { + foreach ($requirementsArrayItemNode->value->getValuesWithSilentKey() as $nestedArrayItemNode) { if (!\is_string($nestedArrayItemNode->value)) { continue; } diff --git a/vendor/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php b/vendor/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php new file mode 100644 index 00000000000..2485888e3d4 --- /dev/null +++ b/vendor/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php @@ -0,0 +1,32 @@ +nodeNameResolver = $nodeNameResolver; + } + public function detect(Closure $closure) : bool + { + if (\count($closure->params) !== 1) { + return \false; + } + $firstParam = $closure->params[0]; + if (!$firstParam->type instanceof FullyQualified) { + return \false; + } + return $this->nodeNameResolver->isName($firstParam->type, ContainerConfigurator::class); + } +} diff --git a/vendor/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php b/vendor/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php index 58810b4bda0..016dd260f46 100644 --- a/vendor/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php +++ b/vendor/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php @@ -8,6 +8,7 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNod final class StringValueQuoteWrapper { /** + * @readonly * @var \Rector\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser\ArrayParser */ private $arrayParser; diff --git a/vendor/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php b/vendor/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php new file mode 100644 index 00000000000..1a7d808d8dd --- /dev/null +++ b/vendor/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php @@ -0,0 +1,97 @@ +symfonyPhpClosureDetector = $symfonyPhpClosureDetector; + $this->serviceNameToTypeUniqueProvider = $serviceNameToTypeUniqueProvider; + } + public function getRuleDefinition() : RuleDefinition + { + return new RuleDefinition('Change $service->set() string names to class-type-based names, to allow $container->get() by types in Symfony 2.8. Provide XML config via $rectorConfig->symfonyContainerXml(...);', [new CodeSample(<<<'CODE_SAMPLE' +use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; + +return static function (ContainerConfigurator $containerConfigurator): void { + $services = $containerConfigurator->services(); + + $services->set('some_name', App\SomeClass::class); +}; +CODE_SAMPLE +, <<<'CODE_SAMPLE' +use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; + +return static function (ContainerConfigurator $containerConfigurator): void { + $services = $containerConfigurator->services(); + + $services->set('app\\someclass', App\SomeClass::class); +}; +CODE_SAMPLE +)]); + } + /** + * @return array> + */ + public function getNodeTypes() : array + { + return [Closure::class]; + } + /** + * @param Closure $node + */ + public function refactor(Node $node) : ?Node + { + $hasChanged = \false; + if (!$this->symfonyPhpClosureDetector->detect($node)) { + return null; + } + $serviceNamesToType = $this->serviceNameToTypeUniqueProvider->provide(); + $hasChanged = \false; + $this->traverseNodesWithCallable($node->stmts, function (Node $node) use($serviceNamesToType, &$hasChanged) { + if (!$node instanceof String_) { + return null; + } + foreach ($serviceNamesToType as $serviceName => $serviceType) { + if ($node->value !== $serviceName) { + continue; + } + $hasChanged = \true; + return $this->createTypedServiceName($serviceType); + } + return null; + }); + if ($hasChanged) { + return $node; + } + return null; + } + private function createTypedServiceName(string $serviceType) : String_ + { + $typedServiceName = \strtolower($serviceType); + return String_::fromString("'" . $typedServiceName . "'"); + } +} diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php deleted file mode 100644 index 4337368698b..00000000000 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ServiceSetStringNameToClassNameRector.php +++ /dev/null @@ -1,84 +0,0 @@ -set() string names to class-type-based names, to allow $container->get() by types in Symfony 2.8', [new CodeSample(<<<'CODE_SAMPLE' -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); - - $services->set('some_name', App\SomeClass::class); -}; -CODE_SAMPLE -, <<<'CODE_SAMPLE' -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); - - $services->set('app\\someclass', App\SomeClass::class); -}; -CODE_SAMPLE -)]); - } - /** - * @return array> - */ - public function getNodeTypes() : array - { - return [MethodCall::class]; - } - /** - * @param MethodCall $node - */ - public function refactor(Node $node) : ?Node - { - if (!$this->isName($node->name, 'set')) { - return null; - } - if (\count($node->getArgs()) !== 2) { - return null; - } - if (!$this->isObjectType($node->var, new ObjectType('Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServicesConfigurator'))) { - return null; - } - $args = $node->getArgs(); - $firstArg = $args[0]; - $serviceName = $this->valueResolver->getValue($firstArg->value); - if (!\is_string($serviceName)) { - return null; - } - // already slash renamed - if (\strpos($serviceName, '\\') !== \false) { - return null; - } - $secondArg = $args[1]; - if (!$secondArg->value instanceof ClassConstFetch && !$secondArg->value instanceof String_) { - return null; - } - $serviceType = $this->valueResolver->getValue($secondArg->value); - if (!\is_string($serviceType)) { - return null; - } - $typedServiceName = \strtolower($serviceType); - $firstArg->value = String_::fromString("'" . $typedServiceName . "'"); - return $node; - } -} diff --git a/vendor/rector/rector-symfony/src/ValueObject/ServiceMap/ServiceMap.php b/vendor/rector/rector-symfony/src/ValueObject/ServiceMap/ServiceMap.php index d2bc5b16c45..f51556b130d 100644 --- a/vendor/rector/rector-symfony/src/ValueObject/ServiceMap/ServiceMap.php +++ b/vendor/rector/rector-symfony/src/ValueObject/ServiceMap/ServiceMap.php @@ -53,6 +53,13 @@ final class ServiceMap } return $servicesWithTag; } + /** + * @return ServiceDefinition[] + */ + public function getServices() : array + { + return $this->services; + } private function getService(string $id) : ?ServiceDefinition { return $this->services[$id] ?? null;