diff --git a/packages/Testing/Fixture/FixtureFileFinder.php b/packages/Testing/Fixture/FixtureFileFinder.php index cc5f4f9ef66..c2184178027 100644 --- a/packages/Testing/Fixture/FixtureFileFinder.php +++ b/packages/Testing/Fixture/FixtureFileFinder.php @@ -12,7 +12,7 @@ final class FixtureFileFinder */ public static function yieldDirectory(string $directory, string $suffix = '*.php.inc') : Iterator { - $finder = (new Finder())->in($directory)->files()->name($suffix); + $finder = (new Finder())->in($directory)->files()->name($suffix)->sortByName(); foreach ($finder as $fileInfo) { (yield [$fileInfo->getRealPath()]); } diff --git a/rules/Naming/Naming/ExpectedNameResolver.php b/rules/Naming/Naming/ExpectedNameResolver.php index 99c6c497d95..f913e580dec 100644 --- a/rules/Naming/Naming/ExpectedNameResolver.php +++ b/rules/Naming/Naming/ExpectedNameResolver.php @@ -163,14 +163,14 @@ final class ExpectedNameResolver } $expectedNameFromType = $this->propertyNaming->getExpectedNameFromType($innerReturnedType ?? $returnedType); if ($this->isReturnedTypeAnArrayAndExpectedNameFromTypeNotNull($returnedType, $expectedNameFromType)) { - return ($expectedNameFromType2 = $expectedNameFromType) ? $expectedNameFromType2->getSingularized() : null; + return ($nullsafeVariable1 = $expectedNameFromType) ? $nullsafeVariable1->getSingularized() : null; } $expectedNameFromMethodName = $this->propertyNaming->getExpectedNameFromMethodName($name); if (!$expectedNameFromMethodName instanceof ExpectedName) { - return ($expectedNameFromType2 = $expectedNameFromType) ? $expectedNameFromType2->getSingularized() : null; + return ($nullsafeVariable2 = $expectedNameFromType) ? $nullsafeVariable2->getSingularized() : null; } if ($expectedNameFromMethodName->isSingular()) { - return ($expectedNameFromType2 = $expectedNameFromType) ? $expectedNameFromType2->getSingularized() : null; + return ($nullsafeVariable3 = $expectedNameFromType) ? $nullsafeVariable3->getSingularized() : null; } return $expectedNameFromMethodName->getSingularized(); } diff --git a/rules/Naming/Naming/VariableNaming.php b/rules/Naming/Naming/VariableNaming.php index fc1c83e953b..5c7e614144c 100644 --- a/rules/Naming/Naming/VariableNaming.php +++ b/rules/Naming/Naming/VariableNaming.php @@ -3,10 +3,8 @@ declare (strict_types=1); namespace Rector\Naming\Naming; -use RectorPrefix202308\Nette\Utils\Strings; use PhpParser\Node; use PhpParser\Node\Arg; -use PhpParser\Node\Expr; use PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; @@ -14,7 +12,6 @@ use PhpParser\Node\Expr\NullsafeMethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; -use PHPStan\Analyser\MutatingScope; use PHPStan\Analyser\Scope; use PHPStan\Type\ThisType; use PHPStan\Type\Type; @@ -46,21 +43,6 @@ final class VariableNaming $this->nodeTypeResolver = $nodeTypeResolver; $this->assignVariableNameResolvers = [$propertyFetchAssignVariableNameResolver, $newAssignVariableNameResolver]; } - /** - * @api - */ - public function resolveFromNodeWithScopeCountAndFallbackName(Expr $expr, MutatingScope $mutatingScope, string $fallbackName) : string - { - $name = $this->resolveFromNode($expr); - if ($name === null) { - $name = $fallbackName; - } - if (\strpos($name, '\\') !== \false) { - $name = (string) Strings::after($name, '\\', -1); - } - $countedValueName = $this->createCountedValueName($name, $mutatingScope); - return \lcfirst($countedValueName); - } public function createCountedValueName(string $valueName, ?Scope $scope) : string { if (!$scope instanceof Scope) { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 4c45398133e..9c5a275802e 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 = 'cbc026e3245d744eea5cf1fc48f3722f67b62173'; + public const PACKAGE_VERSION = 'fbcd7cf7e6c61be3ad014eebe50ff6c83e8a202e'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-08-04 17:11:09'; + public const RELEASE_DATE = '2023-08-04 18:25:09'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 8e9dc9e77da..19a5537ea09 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 ComposerAutoloaderInitcf75ec4c9402a8a16867d42448f6eccb::getLoader(); +return ComposerAutoloaderInit26dd2f7c4e74ebe7862da0decf799cb6::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 20bb2bfbeb8..09e61db3ec6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitcf75ec4c9402a8a16867d42448f6eccb +class ComposerAutoloaderInit26dd2f7c4e74ebe7862da0decf799cb6 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInitcf75ec4c9402a8a16867d42448f6eccb return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitcf75ec4c9402a8a16867d42448f6eccb', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit26dd2f7c4e74ebe7862da0decf799cb6', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitcf75ec4c9402a8a16867d42448f6eccb', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit26dd2f7c4e74ebe7862da0decf799cb6', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6::$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 f197aca3deb..c9a0a896925 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb +class ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3015,9 +3015,9 @@ class ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitcf75ec4c9402a8a16867d42448f6eccb::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit26dd2f7c4e74ebe7862da0decf799cb6::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 6793fbb0015..744ea7f68dd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1986,12 +1986,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git", - "reference": "38b84484d36f29b93cb51ff0c4dceb7753b9fb18" + "reference": "1f3414a9b5434e1371f351bd4354b8719a5e4d0c" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/38b84484d36f29b93cb51ff0c4dceb7753b9fb18", - "reference": "38b84484d36f29b93cb51ff0c4dceb7753b9fb18", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/1f3414a9b5434e1371f351bd4354b8719a5e4d0c", + "reference": "1f3414a9b5434e1371f351bd4354b8719a5e4d0c", "shasum": "" }, "require": { @@ -2017,7 +2017,7 @@ "tomasvotruba\/type-coverage": "^0.2", "tomasvotruba\/unused-public": "^0.1" }, - "time": "2023-08-04T16:28:55+00:00", + "time": "2023-08-04T17:18:50+00:00", "default-branch": true, "type": "rector-extension", "extra": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 946c11560cf..e39d345d94e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202308; -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.8', 'version' => '2.0.8.0', 'reference' => 'f9301a5b2fb1216b2b08f02ba04dc45423db6bff', '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), 'illuminate/container' => array('pretty_version' => 'v10.17.1', 'version' => '10.17.1.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.17.1', 'version' => '10.17.1.0', 'reference' => 'eb1a7e72e159136a832f2c0467de5570bdc208ae', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', '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.10', 'version' => '3.2.10.0', 'reference' => 'a4175c62652f2300c8017fb7e640f9ccb11648d2', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.16.0', 'version' => '4.16.0.0', 'reference' => '19526a33fb561ef417e822e85f08a00db4059c17', '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.23.1', 'version' => '1.23.1.0', 'reference' => '846ae76eef31c6d7790fac9bc399ecee45160b26', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.26', 'version' => '1.10.26.0', 'reference' => '5d660cbb7e1b89253a47147ae44044f49832351f', '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')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.11.0', 'version' => '1.11.0.0', 'reference' => '3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f', '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/socket' => array('pretty_version' => 'v1.13.0', 'version' => '1.13.0.0', 'reference' => 'cff482bbad5848ecbe8b57da57e4e213b03619aa', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'dbc34e9e73eac53684db3324dde9b6abfca745bb', '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' => '38b84484d36f29b93cb51ff0c4dceb7753b9fb18', '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' => '04381624cfee50410f0fd06f4cedd21fbd883535', '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' => 'a0af12a8d67d0edefe6cffd22cdced62729a1dd9', '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.3.0')), 'symfony/config' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => 'b47ca238b03e7b0d7880ffd1cf06e8d637ca1467', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => 'aa5d64ad3f63f2e48964fc81ee45cb318a723898', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'reference' => '9e4b5e4e44e7620475dbceecf7c72c3883f3ea35', '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.3.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.3.1', 'version' => '6.3.1.0', 'reference' => 'edd36776956f2a6fcf577edb5b05eb0e3bdc52ae', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.3.3', 'version' => '6.3.3.0', 'reference' => '9915db259f67d21eefee768c1abcf1cc61b1fc9e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), '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.3.2', 'version' => '6.3.2.0', 'reference' => 'c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => '53d1a83225002635bca3482fcbf963001313fb68', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), '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.3', 'version' => '2.10.3.0', 'reference' => 'ec6637866d6836ef6f8de2bab63ae7708b23bcd7', '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.8', 'version' => '2.0.8.0', 'reference' => 'f9301a5b2fb1216b2b08f02ba04dc45423db6bff', '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), 'illuminate/container' => array('pretty_version' => 'v10.17.1', 'version' => '10.17.1.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.17.1', 'version' => '10.17.1.0', 'reference' => 'eb1a7e72e159136a832f2c0467de5570bdc208ae', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', '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.10', 'version' => '3.2.10.0', 'reference' => 'a4175c62652f2300c8017fb7e640f9ccb11648d2', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.16.0', 'version' => '4.16.0.0', 'reference' => '19526a33fb561ef417e822e85f08a00db4059c17', '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.23.1', 'version' => '1.23.1.0', 'reference' => '846ae76eef31c6d7790fac9bc399ecee45160b26', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.26', 'version' => '1.10.26.0', 'reference' => '5d660cbb7e1b89253a47147ae44044f49832351f', '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')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.11.0', 'version' => '1.11.0.0', 'reference' => '3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f', '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/socket' => array('pretty_version' => 'v1.13.0', 'version' => '1.13.0.0', 'reference' => 'cff482bbad5848ecbe8b57da57e4e213b03619aa', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'dbc34e9e73eac53684db3324dde9b6abfca745bb', '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' => '1f3414a9b5434e1371f351bd4354b8719a5e4d0c', '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' => '04381624cfee50410f0fd06f4cedd21fbd883535', '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' => 'a0af12a8d67d0edefe6cffd22cdced62729a1dd9', '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.3.0')), 'symfony/config' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => 'b47ca238b03e7b0d7880ffd1cf06e8d637ca1467', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => 'aa5d64ad3f63f2e48964fc81ee45cb318a723898', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'reference' => '9e4b5e4e44e7620475dbceecf7c72c3883f3ea35', '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.3.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.3.1', 'version' => '6.3.1.0', 'reference' => 'edd36776956f2a6fcf577edb5b05eb0e3bdc52ae', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.3.3', 'version' => '6.3.3.0', 'reference' => '9915db259f67d21eefee768c1abcf1cc61b1fc9e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), '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.3.2', 'version' => '6.3.2.0', 'reference' => 'c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.3.2', 'version' => '6.3.2.0', 'reference' => '53d1a83225002635bca3482fcbf963001313fb68', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), '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.3', 'version' => '2.10.3.0', 'reference' => 'ec6637866d6836ef6f8de2bab63ae7708b23bcd7', '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 b153eaca304..7831d2d62a8 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 dbc34e9'), '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 38b8448'), '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 0438162'), '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 a0af12a')); + 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 dbc34e9'), '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 1f3414a'), '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 0438162'), '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 a0af12a')); private function __construct() { } diff --git a/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index bd8e5066d5d..1ff9b6033b5 100644 --- a/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -11,35 +11,25 @@ use PhpParser\Node\Expr\NullsafePropertyFetch; use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Expr\Variable; -use PHPStan\Analyser\MutatingScope; -use PHPStan\Analyser\Scope; -use Rector\Core\Rector\AbstractScopeAwareRector; -use Rector\Naming\Naming\VariableNaming; +use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\DowngradeNullsafeToTernaryOperatorRectorTest */ -final class DowngradeNullsafeToTernaryOperatorRector extends AbstractScopeAwareRector +final class DowngradeNullsafeToTernaryOperatorRector extends AbstractRector { /** - * @readonly - * @var \Rector\Naming\Naming\VariableNaming + * @var int */ - private $variableNaming; - public function __construct(VariableNaming $variableNaming) - { - $this->variableNaming = $variableNaming; - } + private $counter = 0; public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Change nullsafe operator to ternary operator rector', [new CodeSample(<<<'CODE_SAMPLE' $dateAsString = $booking->getStartDate()?->asDateTimeString(); -$dateAsString = $booking->startDate?->dateTimeString; CODE_SAMPLE , <<<'CODE_SAMPLE' $dateAsString = ($bookingGetStartDate = $booking->getStartDate()) ? $bookingGetStartDate->asDateTimeString() : null; -$dateAsString = ($bookingGetStartDate = $booking->startDate) ? $bookingGetStartDate->dateTimeString : null; CODE_SAMPLE )]); } @@ -53,13 +43,16 @@ CODE_SAMPLE /** * @param NullsafeMethodCall|NullsafePropertyFetch $node */ - public function refactorWithScope(Node $node, Scope $scope) : Ternary + public function refactor(Node $node) : Ternary { - /** @var MutatingScope $scope */ - $tempVarName = $this->variableNaming->resolveFromNodeWithScopeCountAndFallbackName($node->var, $scope, '_'); - $variable = new Variable($tempVarName); - $called = $node instanceof NullsafeMethodCall ? new MethodCall($variable, $node->name, $node->getArgs()) : new PropertyFetch($variable, $node->name); - $assign = new Assign($variable, $node->var); - return new Ternary($assign, $called, $this->nodeFactory->createNull()); + $nullsafeVariableName = $this->createNullsafeVariable(); + $methodCallOrPropertyFetch = $node instanceof NullsafeMethodCall ? new MethodCall($nullsafeVariableName, $node->name, $node->getArgs()) : new PropertyFetch($nullsafeVariableName, $node->name); + $assign = new Assign($nullsafeVariableName, $node->var); + return new Ternary($assign, $methodCallOrPropertyFetch, $this->nodeFactory->createNull()); + } + private function createNullsafeVariable() : Variable + { + $nullsafeVariableName = 'nullsafeVariable' . ++$this->counter; + return new Variable($nullsafeVariableName); } } diff --git a/vendor/sebastian/diff/src/Parser.php b/vendor/sebastian/diff/src/Parser.php index abf783bb31c..8035ba28363 100644 --- a/vendor/sebastian/diff/src/Parser.php +++ b/vendor/sebastian/diff/src/Parser.php @@ -76,7 +76,7 @@ final class Parser $type = Line::REMOVED; } $diffLines[] = new Line($type, $match['line']); - ($chunk2 = $chunk) ? $chunk2->setLines($diffLines) : null; + ($nullsafeVariable4 = $chunk) ? $nullsafeVariable4->setLines($diffLines) : null; } } $diff->setChunks($chunks); diff --git a/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php b/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php index 464e617a9ca..709ce9fed7f 100644 --- a/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php +++ b/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php @@ -48,7 +48,7 @@ class DefinitionFileLoader extends FileLoader $loader = $this; $path = $this->locator->locate($resource); $this->setCurrentDir(\dirname($path)); - ($container = $this->container) ? $container->fileExists($path) : null; + ($nullsafeVariable5 = $this->container) ? $nullsafeVariable5->fileExists($path) : null; // the closure forbids access to the private scope in the included file $load = \Closure::bind(static function ($file) use($loader) { return include $file; diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index f05b497a2e2..368d5ea62d7 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -559,7 +559,7 @@ class Application implements ResetInterface public function has(string $name) : bool { $this->init(); - return isset($this->commands[$name]) || (($commandLoader = $this->commandLoader) ? $commandLoader->has($name) : null) && $this->add($this->commandLoader->get($name)); + return isset($this->commands[$name]) || (($nullsafeVariable6 = $this->commandLoader) ? $nullsafeVariable6->has($name) : null) && $this->add($this->commandLoader->get($name)); } /** * Returns an array of all unique namespaces used by currently registered commands. diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index a560f5b35bf..fa9fbb29f0e 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -459,7 +459,7 @@ class Command throw new \TypeError(\sprintf('Argument 5 passed to "%s()" must be array or \\Closure, "%s" given.', __METHOD__, \get_debug_type($suggestedValues))); } $this->definition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)); - ($fullDefinition = $this->fullDefinition) ? $fullDefinition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)) : null; + ($nullsafeVariable7 = $this->fullDefinition) ? $nullsafeVariable7->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)) : null; return $this; } /** @@ -483,7 +483,7 @@ class Command throw new \TypeError(\sprintf('Argument 5 passed to "%s()" must be array or \\Closure, "%s" given.', __METHOD__, \get_debug_type($suggestedValues))); } $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)); - ($fullDefinition = $this->fullDefinition) ? $fullDefinition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)) : null; + ($nullsafeVariable8 = $this->fullDefinition) ? $nullsafeVariable8->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)) : null; return $this; } /** @@ -582,7 +582,7 @@ class Command public function getProcessedHelp() : string { $name = $this->name; - $isSingleCommand = ($application = $this->application) ? $application->isSingleCommand() : null; + $isSingleCommand = ($nullsafeVariable9 = $this->application) ? $nullsafeVariable9->isSingleCommand() : null; $placeholders = ['%command.name%', '%command.full_name%']; $replacements = [$name, $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'] . ' ' . $name]; return \str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); diff --git a/vendor/symfony/console/Completion/CompletionInput.php b/vendor/symfony/console/Completion/CompletionInput.php index b7392b2ecbe..2ef98d2889c 100644 --- a/vendor/symfony/console/Completion/CompletionInput.php +++ b/vendor/symfony/console/Completion/CompletionInput.php @@ -69,7 +69,7 @@ final class CompletionInput extends ArgvInput $this->completionValue = $relevantToken; return; } - if (($option2 = $option) ? $option2->acceptValue() : null) { + if (($nullsafeVariable1 = $option) ? $nullsafeVariable1->acceptValue() : null) { $this->completionType = self::TYPE_OPTION_VALUE; $this->completionName = $option->getName(); $this->completionValue = $optionValue ?: (\strncmp($optionToken, '--', \strlen('--')) !== 0 ? \substr($optionToken, 2) : ''); @@ -80,7 +80,7 @@ final class CompletionInput extends ArgvInput if ('-' === $previousToken[0] && '' !== \trim($previousToken, '-')) { // check if previous option accepted a value $previousOption = $this->getOptionFromToken($previousToken); - if (($previousOption2 = $previousOption) ? $previousOption2->acceptValue() : null) { + if (($nullsafeVariable2 = $previousOption) ? $nullsafeVariable2->acceptValue() : null) { $this->completionType = self::TYPE_OPTION_VALUE; $this->completionName = $previousOption->getName(); $this->completionValue = $relevantToken; diff --git a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php index dfbd72bd54e..feca2d3f58a 100644 --- a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php @@ -115,9 +115,9 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass if ($value instanceof Reference) { $targetId = $this->getDefinitionId((string) $value); $targetDefinition = null !== $targetId ? $this->container->getDefinition($targetId) : null; - $this->graph->connect($this->currentId, $this->currentDefinition, $targetId, $targetDefinition, $value, $this->lazy || $this->hasProxyDumper && (($targetDefinition2 = $targetDefinition) ? $targetDefinition2->isLazy() : null), ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), $this->byConstructor); + $this->graph->connect($this->currentId, $this->currentDefinition, $targetId, $targetDefinition, $value, $this->lazy || $this->hasProxyDumper && (($nullsafeVariable10 = $targetDefinition) ? $nullsafeVariable10->isLazy() : null), ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), $this->byConstructor); if ($inExpression) { - $this->graph->connect('.internal.reference_in_expression', null, $targetId, $targetDefinition, $value, $this->lazy || (($targetDefinition2 = $targetDefinition) ? $targetDefinition2->isLazy() : null), \true); + $this->graph->connect('.internal.reference_in_expression', null, $targetId, $targetDefinition, $value, $this->lazy || (($nullsafeVariable11 = $targetDefinition) ? $nullsafeVariable11->isLazy() : null), \true); } return $value; } diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php index 3efae21cb60..774dbcea1db 100644 --- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php +++ b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php @@ -71,7 +71,7 @@ class DecoratorServicePass extends AbstractRecursivePass } else { throw new ServiceNotFoundException($inner, $id); } - if (($decoratedDefinition2 = $decoratedDefinition) ? $decoratedDefinition2->isSynthetic() : null) { + if (($nullsafeVariable3 = $decoratedDefinition) ? $nullsafeVariable3->isSynthetic() : null) { throw new InvalidArgumentException(\sprintf('A synthetic service cannot be decorated: service "%s" cannot decorate "%s".', $id, $inner)); } if (isset($decoratingDefinitions[$inner])) { diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php index ef9ad23ba1f..d189b755206 100644 --- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php @@ -1635,7 +1635,7 @@ EOF; if ($value->hasErrors() && ($e = $value->getErrors())) { return \sprintf('throw new RuntimeException(%s)', $this->export(\reset($e))); } - if (($definitionVariables = $this->definitionVariables) ? $definitionVariables->contains($value) : null) { + if (($nullsafeVariable4 = $this->definitionVariables) ? $nullsafeVariable4->contains($value) : null) { return $this->dumpValue($this->definitionVariables[$value], $interpolate); } if ($value->getMethodCalls()) { diff --git a/vendor/tracy/tracy/src/Tracy/Helpers.php b/vendor/tracy/tracy/src/Tracy/Helpers.php index 3befb3f7767..b2d85d8a077 100644 --- a/vendor/tracy/tracy/src/Tracy/Helpers.php +++ b/vendor/tracy/tracy/src/Tracy/Helpers.php @@ -421,7 +421,7 @@ XX $skip[$refId] = \true; } foreach ($val as $k => $v) { - $refId = ($fromArrayElement = \ReflectionReference::fromArrayElement($val, $k)) ? $fromArrayElement->getId() : null; + $refId = ($nullsafeVariable5 = \ReflectionReference::fromArrayElement($val, $k)) ? $nullsafeVariable5->getId() : null; self::traverseValue($v, $callback, $skip, $refId); } }