diff --git a/README.md b/README.md index a5a479c46e6..12334d96fc8 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ By [buying a book](https://leanpub.com/rector-the-power-of-automated-refactoring - [How Does Rector Work?](/docs/how_it_works.md) - [PHP Parser Nodes](https://github.com/rectorphp/php-parser-nodes-docs/) - [How to Work with Doc Block and Comments](/docs/how_to_work_with_doc_block_and_comments.md) -- [How to Generate New Rector Rule](/docs/create_own_rule.md) +- [How to Create Own Rector Rule](/docs/create_own_rule.md) See [the full documentation](/docs). diff --git a/docs/how_to_register_custom_setlist_constant.md b/docs/how_to_register_custom_setlist_constant.md index 211e15530f9..b3ee9156dbd 100644 --- a/docs/how_to_register_custom_setlist_constant.md +++ b/docs/how_to_register_custom_setlist_constant.md @@ -4,13 +4,11 @@ You can have custom `SetList` class that has constants that pointed to your own ```php -defaultDiffer = $defaultDiffer; $this->consoleDiffer = $consoleDiffer; - $this->smartFileSystem = $smartFileSystem; + $this->filePathHelper = $filePathHelper; } public function createFileDiff(File $file, string $oldContent, string $newContent) : FileDiff { - $relativeFilePath = $this->smartFileSystem->makePathRelative($file->getFilePath(), (string) \realpath(\getcwd())); - $relativeFilePath = \rtrim($relativeFilePath, '/'); + $relativeFilePath = $this->filePathHelper->relativePath($file->getFilePath()); // always keep the most recent diff return new FileDiff($relativeFilePath, $this->defaultDiffer->diff($oldContent, $newContent), $this->consoleDiffer->diff($oldContent, $newContent), $file->getRectorWithLineChanges()); } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index c7e52ce3c1f..b025881db9e 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 = 'bd6c02a3f8154152f879106c8e77731eb3f4e69c'; + public const PACKAGE_VERSION = 'a6dfb049d7100c6bb5aa93735199f8434381d210'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-08-29 19:47:40'; + public const RELEASE_DATE = '2022-08-29 20:14:24'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 24c7ffed839..6de700230f7 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 ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9::getLoader(); +return ComposerAutoloaderInitcd1f1758a12d59a8465f8d671b277097::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 14607154cdf..70be587b88f 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2479,29 +2479,6 @@ return array( 'Rector\\ReadWrite\\ReadNodeAnalyzer\\JustReadExprAnalyzer' => $baseDir . '/packages/ReadWrite/ReadNodeAnalyzer/JustReadExprAnalyzer.php', 'Rector\\ReadWrite\\ReadNodeAnalyzer\\LocalPropertyFetchReadNodeAnalyzer' => $baseDir . '/packages/ReadWrite/ReadNodeAnalyzer/LocalPropertyFetchReadNodeAnalyzer.php', 'Rector\\ReadWrite\\ReadNodeAnalyzer\\VariableReadNodeAnalyzer' => $baseDir . '/packages/ReadWrite/ReadNodeAnalyzer/VariableReadNodeAnalyzer.php', - 'Rector\\RectorGenerator\\Command\\GenerateCommand' => $vendorDir . '/rector/rector-generator/src/Command/GenerateCommand.php', - 'Rector\\RectorGenerator\\Command\\InitRecipeCommand' => $vendorDir . '/rector/rector-generator/src/Command/InitRecipeCommand.php', - 'Rector\\RectorGenerator\\Enum\\Packages' => $vendorDir . '/rector/rector-generator/src/Enum/Packages.php', - 'Rector\\RectorGenerator\\Exception\\ConfigurationException' => $vendorDir . '/rector/rector-generator/src/Exception/ConfigurationException.php', - 'Rector\\RectorGenerator\\Exception\\ShouldNotHappenException' => $vendorDir . '/rector/rector-generator/src/Exception/ShouldNotHappenException.php', - 'Rector\\RectorGenerator\\FileSystem\\ConfigFilesystem' => $vendorDir . '/rector/rector-generator/src/FileSystem/ConfigFilesystem.php', - 'Rector\\RectorGenerator\\FileSystem\\TemplateFileSystem' => $vendorDir . '/rector/rector-generator/src/FileSystem/TemplateFileSystem.php', - 'Rector\\RectorGenerator\\Finder\\TemplateFinder' => $vendorDir . '/rector/rector-generator/src/Finder/TemplateFinder.php', - 'Rector\\RectorGenerator\\Generator\\FileGenerator' => $vendorDir . '/rector/rector-generator/src/Generator/FileGenerator.php', - 'Rector\\RectorGenerator\\Generator\\RectorGenerator' => $vendorDir . '/rector/rector-generator/src/Generator/RectorGenerator.php', - 'Rector\\RectorGenerator\\Guard\\OverrideGuard' => $vendorDir . '/rector/rector-generator/src/Guard/OverrideGuard.php', - 'Rector\\RectorGenerator\\NodeFactory\\ConfigurationNodeFactory' => $vendorDir . '/rector/rector-generator/src/NodeFactory/ConfigurationNodeFactory.php', - 'Rector\\RectorGenerator\\NodeFactory\\ConfigureClassMethodFactory' => $vendorDir . '/rector/rector-generator/src/NodeFactory/ConfigureClassMethodFactory.php', - 'Rector\\RectorGenerator\\NodeFactory\\NodeFactory' => $vendorDir . '/rector/rector-generator/src/NodeFactory/NodeFactory.php', - 'Rector\\RectorGenerator\\Provider\\RectorRecipeProvider' => $vendorDir . '/rector/rector-generator/src/Provider/RectorRecipeProvider.php', - 'Rector\\RectorGenerator\\TemplateFactory' => $vendorDir . '/rector/rector-generator/src/TemplateFactory.php', - 'Rector\\RectorGenerator\\TemplateInitializer' => $vendorDir . '/rector/rector-generator/src/TemplateInitializer.php', - 'Rector\\RectorGenerator\\TemplateVariablesFactory' => $vendorDir . '/rector/rector-generator/src/TemplateVariablesFactory.php', - 'Rector\\RectorGenerator\\ValueObject\\NamePattern' => $vendorDir . '/rector/rector-generator/src/ValueObject/NamePattern.php', - 'Rector\\RectorGenerator\\ValueObject\\Option' => $vendorDir . '/rector/rector-generator/src/ValueObject/Option.php', - 'Rector\\RectorGenerator\\ValueObject\\Placeholder' => $vendorDir . '/rector/rector-generator/src/ValueObject/Placeholder.php', - 'Rector\\RectorGenerator\\ValueObject\\RectorGeneratorConfig' => $vendorDir . '/rector/rector-generator/src/ValueObject/RectorGeneratorConfig.php', - 'Rector\\RectorGenerator\\ValueObject\\RectorRecipe' => $vendorDir . '/rector/rector-generator/src/ValueObject/RectorRecipe.php', 'Rector\\RectorInstaller\\Filesystem' => $vendorDir . '/rector/extension-installer/src/Filesystem.php', 'Rector\\RectorInstaller\\GeneratedConfig' => $vendorDir . '/rector/extension-installer/src/GeneratedConfig.php', 'Rector\\RectorInstaller\\LocalFilesystem' => $vendorDir . '/rector/extension-installer/src/LocalFilesystem.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 326c68007fe..8c3e7b5aa76 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -12,7 +12,6 @@ return array( 'Rector\\Utils\\' => array($baseDir . '/utils'), 'Rector\\Symfony\\' => array($vendorDir . '/rector/rector-symfony/src'), 'Rector\\RectorInstaller\\' => array($vendorDir . '/rector/extension-installer/src'), - 'Rector\\RectorGenerator\\' => array($vendorDir . '/rector/rector-generator/src'), 'Rector\\PHPUnit\\' => array($vendorDir . '/rector/rector-phpunit/src'), 'Rector\\PHPOffice\\' => array($vendorDir . '/rector/rector-phpoffice/src'), 'Rector\\Laravel\\' => array($vendorDir . '/rector/rector-laravel/src'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index ca22952ea94..49ac559ab34 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9 +class ComposerAutoloaderInitcd1f1758a12d59a8465f8d671b277097 { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcd1f1758a12d59a8465f8d671b277097', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcd1f1758a12d59a8465f8d671b277097', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcd1f1758a12d59a8465f8d671b277097::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInitcd1f1758a12d59a8465f8d671b277097::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire83716a21ad55eb60ab18d8cb830f08a9($fileIdentifier, $file); + composerRequirecd1f1758a12d59a8465f8d671b277097($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit83716a21ad55eb60ab18d8cb830f08a9 * @param string $file * @return void */ -function composerRequire83716a21ad55eb60ab18d8cb830f08a9($fileIdentifier, $file) +function composerRequirecd1f1758a12d59a8465f8d671b277097($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 e3050131a08..1c110534565 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9 +class ComposerStaticInitcd1f1758a12d59a8465f8d671b277097 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -29,7 +29,6 @@ class ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9 'Rector\\Utils\\' => 13, 'Rector\\Symfony\\' => 15, 'Rector\\RectorInstaller\\' => 23, - 'Rector\\RectorGenerator\\' => 23, 'Rector\\PHPUnit\\' => 15, 'Rector\\PHPOffice\\' => 17, 'Rector\\Laravel\\' => 15, @@ -107,10 +106,6 @@ class ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9 array ( 0 => __DIR__ . '/..' . '/rector/extension-installer/src', ), - 'Rector\\RectorGenerator\\' => - array ( - 0 => __DIR__ . '/..' . '/rector/rector-generator/src', - ), 'Rector\\PHPUnit\\' => array ( 0 => __DIR__ . '/..' . '/rector/rector-phpunit/src', @@ -2774,29 +2769,6 @@ class ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9 'Rector\\ReadWrite\\ReadNodeAnalyzer\\JustReadExprAnalyzer' => __DIR__ . '/../..' . '/packages/ReadWrite/ReadNodeAnalyzer/JustReadExprAnalyzer.php', 'Rector\\ReadWrite\\ReadNodeAnalyzer\\LocalPropertyFetchReadNodeAnalyzer' => __DIR__ . '/../..' . '/packages/ReadWrite/ReadNodeAnalyzer/LocalPropertyFetchReadNodeAnalyzer.php', 'Rector\\ReadWrite\\ReadNodeAnalyzer\\VariableReadNodeAnalyzer' => __DIR__ . '/../..' . '/packages/ReadWrite/ReadNodeAnalyzer/VariableReadNodeAnalyzer.php', - 'Rector\\RectorGenerator\\Command\\GenerateCommand' => __DIR__ . '/..' . '/rector/rector-generator/src/Command/GenerateCommand.php', - 'Rector\\RectorGenerator\\Command\\InitRecipeCommand' => __DIR__ . '/..' . '/rector/rector-generator/src/Command/InitRecipeCommand.php', - 'Rector\\RectorGenerator\\Enum\\Packages' => __DIR__ . '/..' . '/rector/rector-generator/src/Enum/Packages.php', - 'Rector\\RectorGenerator\\Exception\\ConfigurationException' => __DIR__ . '/..' . '/rector/rector-generator/src/Exception/ConfigurationException.php', - 'Rector\\RectorGenerator\\Exception\\ShouldNotHappenException' => __DIR__ . '/..' . '/rector/rector-generator/src/Exception/ShouldNotHappenException.php', - 'Rector\\RectorGenerator\\FileSystem\\ConfigFilesystem' => __DIR__ . '/..' . '/rector/rector-generator/src/FileSystem/ConfigFilesystem.php', - 'Rector\\RectorGenerator\\FileSystem\\TemplateFileSystem' => __DIR__ . '/..' . '/rector/rector-generator/src/FileSystem/TemplateFileSystem.php', - 'Rector\\RectorGenerator\\Finder\\TemplateFinder' => __DIR__ . '/..' . '/rector/rector-generator/src/Finder/TemplateFinder.php', - 'Rector\\RectorGenerator\\Generator\\FileGenerator' => __DIR__ . '/..' . '/rector/rector-generator/src/Generator/FileGenerator.php', - 'Rector\\RectorGenerator\\Generator\\RectorGenerator' => __DIR__ . '/..' . '/rector/rector-generator/src/Generator/RectorGenerator.php', - 'Rector\\RectorGenerator\\Guard\\OverrideGuard' => __DIR__ . '/..' . '/rector/rector-generator/src/Guard/OverrideGuard.php', - 'Rector\\RectorGenerator\\NodeFactory\\ConfigurationNodeFactory' => __DIR__ . '/..' . '/rector/rector-generator/src/NodeFactory/ConfigurationNodeFactory.php', - 'Rector\\RectorGenerator\\NodeFactory\\ConfigureClassMethodFactory' => __DIR__ . '/..' . '/rector/rector-generator/src/NodeFactory/ConfigureClassMethodFactory.php', - 'Rector\\RectorGenerator\\NodeFactory\\NodeFactory' => __DIR__ . '/..' . '/rector/rector-generator/src/NodeFactory/NodeFactory.php', - 'Rector\\RectorGenerator\\Provider\\RectorRecipeProvider' => __DIR__ . '/..' . '/rector/rector-generator/src/Provider/RectorRecipeProvider.php', - 'Rector\\RectorGenerator\\TemplateFactory' => __DIR__ . '/..' . '/rector/rector-generator/src/TemplateFactory.php', - 'Rector\\RectorGenerator\\TemplateInitializer' => __DIR__ . '/..' . '/rector/rector-generator/src/TemplateInitializer.php', - 'Rector\\RectorGenerator\\TemplateVariablesFactory' => __DIR__ . '/..' . '/rector/rector-generator/src/TemplateVariablesFactory.php', - 'Rector\\RectorGenerator\\ValueObject\\NamePattern' => __DIR__ . '/..' . '/rector/rector-generator/src/ValueObject/NamePattern.php', - 'Rector\\RectorGenerator\\ValueObject\\Option' => __DIR__ . '/..' . '/rector/rector-generator/src/ValueObject/Option.php', - 'Rector\\RectorGenerator\\ValueObject\\Placeholder' => __DIR__ . '/..' . '/rector/rector-generator/src/ValueObject/Placeholder.php', - 'Rector\\RectorGenerator\\ValueObject\\RectorGeneratorConfig' => __DIR__ . '/..' . '/rector/rector-generator/src/ValueObject/RectorGeneratorConfig.php', - 'Rector\\RectorGenerator\\ValueObject\\RectorRecipe' => __DIR__ . '/..' . '/rector/rector-generator/src/ValueObject/RectorRecipe.php', 'Rector\\RectorInstaller\\Filesystem' => __DIR__ . '/..' . '/rector/extension-installer/src/Filesystem.php', 'Rector\\RectorInstaller\\GeneratedConfig' => __DIR__ . '/..' . '/rector/extension-installer/src/GeneratedConfig.php', 'Rector\\RectorInstaller\\LocalFilesystem' => __DIR__ . '/..' . '/rector/extension-installer/src/LocalFilesystem.php', @@ -3240,9 +3212,9 @@ class ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit83716a21ad55eb60ab18d8cb830f08a9::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcd1f1758a12d59a8465f8d671b277097::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcd1f1758a12d59a8465f8d671b277097::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcd1f1758a12d59a8465f8d671b277097::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index c690767113f..eeead3b9473 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1984,81 +1984,6 @@ }, "install-path": "..\/rector\/rector-downgrade-php" }, - { - "name": "rector\/rector-generator", - "version": "dev-main", - "version_normalized": "dev-main", - "source": { - "type": "git", - "url": "https:\/\/github.com\/rectorphp\/rector-generator.git", - "reference": "38440b9580b6b1d8859bfb72849753b241a1e39a" - }, - "dist": { - "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-generator\/zipball\/38440b9580b6b1d8859bfb72849753b241a1e39a", - "reference": "38440b9580b6b1d8859bfb72849753b241a1e39a", - "shasum": "" - }, - "require": { - "nette\/utils": "^3.2", - "nikic\/php-parser": "^4.14", - "php": ">=8.1", - "symfony\/console": "^6.0", - "symfony\/dependency-injection": "^6.0", - "symfony\/finder": "^6.0", - "symplify\/package-builder": "^11.0" - }, - "require-dev": { - "php-parallel-lint\/php-parallel-lint": "^1.3", - "phpstan\/extension-installer": "^1.1", - "phpstan\/phpdoc-parser": "^1.6.4", - "phpstan\/phpstan-strict-rules": "^1.3", - "phpstan\/phpstan-webmozart-assert": "^1.0", - "phpunit\/phpunit": "^9.5", - "rector\/rector-src": "dev-main", - "symplify\/coding-standard": "^11.0", - "symplify\/easy-coding-standard": "^11.0", - "symplify\/easy-testing": "^11.0", - "symplify\/monorepo-builder": "^11.0", - "symplify\/phpstan-extensions": "^11.0", - "symplify\/phpstan-rules": "^11.0", - "symplify\/vendor-patches": "^11.0" - }, - "time": "2022-08-09T10:09:42+00:00", - "default-branch": true, - "type": "rector-extension", - "extra": { - "enable-patching": true, - "rector": { - "includes": [ - "config\/config.php" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Rector\\RectorGenerator\\": "src" - } - }, - "notification-url": "https:\/\/packagist.org\/downloads\/", - "license": [ - "MIT" - ], - "description": "Generate Rector rules from command line", - "homepage": "https:\/\/getrector.org", - "support": { - "issues": "https:\/\/github.com\/rectorphp\/rector-generator\/issues", - "source": "https:\/\/github.com\/rectorphp\/rector-generator\/tree\/0.6.10" - }, - "funding": [ - { - "url": "https:\/\/github.com\/tomasvotruba", - "type": "github" - } - ], - "install-path": "..\/rector\/rector-generator" - }, { "name": "rector\/rector-laravel", "version": "dev-main", @@ -2200,12 +2125,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git", - "reference": "26e1dcbc5fa3d214af34f627d0d7013b8eba8eb5" + "reference": "24eb4fe75f34c096c29d3ad915e1d25b4770e6ba" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/26e1dcbc5fa3d214af34f627d0d7013b8eba8eb5", - "reference": "26e1dcbc5fa3d214af34f627d0d7013b8eba8eb5", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/24eb4fe75f34c096c29d3ad915e1d25b4770e6ba", + "reference": "24eb4fe75f34c096c29d3ad915e1d25b4770e6ba", "shasum": "" }, "require": { @@ -2230,7 +2155,7 @@ "symplify\/rule-doc-generator": "^11.0", "symplify\/vendor-patches": "^11.0" }, - "time": "2022-08-26T08:56:19+00:00", + "time": "2022-08-29T18:12:57+00:00", "default-branch": true, "type": "rector-extension", "extra": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 89f3fc4da7c..31e8bfbc3dc 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.14.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.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.14.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' => '2eddc311bbdb20214dd629b17da3e751d7ca5ac7', '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' => '26e1dcbc5fa3d214af34f627d0d7013b8eba8eb5', '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.14.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.4', 'version' => '6.1.4.0', 'reference' => '7fccea8728aa2d431a6725b02b3ce759049fc84d', '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.4', 'version' => '6.1.4.0', 'reference' => '3f39c04d2630c34019907b02f85672dac99f8659', '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.4', 'version' => '6.1.4.0', 'reference' => '290972cad7b364e3befaa74ba0ec729800fb161c', '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '4498424853e5e88a6217432325c58074a49b2076', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5af372a577cbc0fe53075d3ea4224982ba07ef46', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(0 => '11.2.x-dev'), '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '87867113755e51f263e244a3694b5078b9ad2cae', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c2474cabfafe9454299e94cb0eb5dad4f51c37f6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'f4074ed2899e041a2422a70d2d8fb25c9346d0d5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(0 => '11.2.x-dev'), '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '820cadad467f72d512ec77d249ad91d1607f1c2d', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '13750407bfc0f9d87661908330368a22bc473251', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(0 => '11.2.x-dev'), '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.14.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.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.14.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' => '2eddc311bbdb20214dd629b17da3e751d7ca5ac7', '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-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' => '24eb4fe75f34c096c29d3ad915e1d25b4770e6ba', '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.14.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.4', 'version' => '6.1.4.0', 'reference' => '7fccea8728aa2d431a6725b02b3ce759049fc84d', '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.4', 'version' => '6.1.4.0', 'reference' => '3f39c04d2630c34019907b02f85672dac99f8659', '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.4', 'version' => '6.1.4.0', 'reference' => '290972cad7b364e3befaa74ba0ec729800fb161c', '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '4498424853e5e88a6217432325c58074a49b2076', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5af372a577cbc0fe53075d3ea4224982ba07ef46', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(0 => '11.2.x-dev'), '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '87867113755e51f263e244a3694b5078b9ad2cae', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c2474cabfafe9454299e94cb0eb5dad4f51c37f6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'f4074ed2899e041a2422a70d2d8fb25c9346d0d5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(0 => '11.2.x-dev'), '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' => 'dev-main', 'version' => 'dev-main', 'reference' => '820cadad467f72d512ec77d249ad91d1607f1c2d', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(0 => '11.2.x-dev'), 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '13750407bfc0f9d87661908330368a22bc473251', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(0 => '11.2.x-dev'), '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 9470bf69f4b..933e4668eab 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 2eddc31'), '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 26e1dcb'), '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')); + 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 2eddc31'), '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-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 24eb4fe'), '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-generator/LICENSE b/vendor/rector/rector-generator/LICENSE deleted file mode 100644 index a89e419fd50..00000000000 --- a/vendor/rector/rector-generator/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -The MIT License ---------------- - -Copyright (c) 2017-present Tomáš Votruba (https://tomasvotruba.cz) - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/rector/rector-generator/composer.json b/vendor/rector/rector-generator/composer.json deleted file mode 100644 index 3290e5f7787..00000000000 --- a/vendor/rector/rector-generator/composer.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "rector\/rector-generator", - "type": "rector-extension", - "description": "Generate Rector rules from command line", - "homepage": "https:\/\/getrector.org", - "license": "MIT", - "require": { - "php": ">=8.1", - "nette\/utils": "^3.2", - "nikic\/php-parser": "^4.14", - "symfony\/console": "^6.0", - "symfony\/dependency-injection": "^6.0", - "symfony\/finder": "^6.0", - "symplify\/package-builder": "^11.0" - }, - "require-dev": { - "rector\/rector-src": "dev-main", - "php-parallel-lint\/php-parallel-lint": "^1.3", - "phpunit\/phpunit": "^9.5", - "phpstan\/phpdoc-parser": "^1.6.4", - "symplify\/coding-standard": "^11.0", - "symplify\/easy-coding-standard": "^11.0", - "symplify\/phpstan-extensions": "^11.0", - "symplify\/phpstan-rules": "^11.0", - "symplify\/easy-testing": "^11.0", - "phpstan\/extension-installer": "^1.1", - "symplify\/monorepo-builder": "^11.0", - "symplify\/vendor-patches": "^11.0", - "phpstan\/phpstan-strict-rules": "^1.3", - "phpstan\/phpstan-webmozart-assert": "^1.0" - }, - "autoload": { - "psr-4": { - "Rector\\RectorGenerator\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Rector\\RectorGenerator\\Tests\\": "tests" - } - }, - "scripts": { - "release": "vendor\/bin\/monorepo-builder release patch --ansi", - "check-cs": "vendor\/bin\/ecs check --ansi", - "fix-cs": "vendor\/bin\/ecs check --fix --ansi", - "phpstan": "vendor\/bin\/phpstan analyse --ansi --error-format symplify" - }, - "extra": { - "enable-patching": true, - "rector": { - "includes": [ - "config\/config.php" - ] - } - }, - "minimum-stability": "dev", - "prefer-stable": true, - "config": { - "allow-plugins": { - "cweagans\/composer-patches": true, - "rector\/extension-installer": true, - "phpstan\/extension-installer": true - } - } -} \ No newline at end of file diff --git a/vendor/rector/rector-generator/config/config.php b/vendor/rector/rector-generator/config/config.php deleted file mode 100644 index db4a675fce1..00000000000 --- a/vendor/rector/rector-generator/config/config.php +++ /dev/null @@ -1,38 +0,0 @@ -services(); - $services->defaults()->public()->autowire()->autoconfigure(); - $services->load('Rector\\RectorGenerator\\', __DIR__ . '/../src')->exclude([__DIR__ . '/../src/ValueObject', __DIR__ . '/../src/Enum']); - // console - $services->set(SymfonyStyleFactory::class); - $services->set(SymfonyStyle::class)->factory([service(SymfonyStyleFactory::class), 'create']); - // filesystem - $services->set(JsonFileSystem::class); - $services->set(SmartFileSystem::class); - $services->set(FinderSanitizer::class); - $services->set(FileSystemGuard::class); - // privates - $services->set(PrivatesCaller::class); - $services->set(PrivatesAccessor::class); - // php-parser - $services->set(Standard::class)->arg('$options', ['shortArraySyntax' => \true]); - $services->set(ParserFactory::class); - $services->set(Parser::class)->factory([service(ParserFactory::class), 'create'])->arg('$kind', ParserFactory::PREFER_PHP7); -}; diff --git a/vendor/rector/rector-generator/monorepo-builder.php b/vendor/rector/rector-generator/monorepo-builder.php deleted file mode 100644 index 89f896a9eef..00000000000 --- a/vendor/rector/rector-generator/monorepo-builder.php +++ /dev/null @@ -1,15 +0,0 @@ -services(); - $services->defaults()->autowire(); - // @see https://github.com/symplify/monorepo-builder#6-release-flow - $services->set(TagVersionReleaseWorker::class); - $services->set(PushTagReleaseWorker::class); -}; diff --git a/vendor/rector/rector-generator/src/Command/GenerateCommand.php b/vendor/rector/rector-generator/src/Command/GenerateCommand.php deleted file mode 100644 index 6c70b588186..00000000000 --- a/vendor/rector/rector-generator/src/Command/GenerateCommand.php +++ /dev/null @@ -1,119 +0,0 @@ -configFilesystem = $configFilesystem; - $this->symfonyStyle = $symfonyStyle; - $this->templateVariablesFactory = $templateVariablesFactory; - $this->rectorRecipeProvider = $rectorRecipeProvider; - $this->rectorGenerator = $rectorGenerator; - parent::__construct(); - } - protected function configure() : void - { - $this->setName('generate'); - $this->setDescription('[DEV] Create a new Rector, in a proper location, with new tests'); - } - protected function execute(InputInterface $input, OutputInterface $output) : int - { - $rectorRecipe = $this->rectorRecipeProvider->provide(); - $targetDirectory = \getcwd(); - $generatedFilePaths = $this->rectorGenerator->generate($rectorRecipe, $targetDirectory); - // nothing new - if ($generatedFilePaths === []) { - return self::SUCCESS; - } - $setFilePath = $rectorRecipe->getSetFilePath(); - if ($setFilePath !== null) { - $templateVariables = $this->templateVariablesFactory->createFromRectorRecipe($rectorRecipe); - $this->configFilesystem->appendRectorServiceToSet($setFilePath, $templateVariables, NamePattern::RECTOR_FQN_NAME_PATTERN); - } - $testCaseDirectoryPath = $this->resolveTestCaseDirectoryPath($generatedFilePaths); - $this->printSuccess($rectorRecipe->getName(), $generatedFilePaths, $testCaseDirectoryPath); - return self::SUCCESS; - } - /** - * @param string[] $generatedFilePaths - */ - private function resolveTestCaseDirectoryPath(array $generatedFilePaths) : string - { - foreach ($generatedFilePaths as $generatedFilePath) { - if (!$this->isGeneratedFilePathTestCase($generatedFilePath)) { - continue; - } - $generatedFileInfo = new SmartFileInfo($generatedFilePath); - return \dirname($generatedFileInfo->getRelativeFilePathFromCwd()); - } - throw new ShouldNotHappenException(); - } - /** - * @param string[] $generatedFilePaths - */ - private function printSuccess(string $name, array $generatedFilePaths, string $testCaseFilePath) : void - { - $message = \sprintf('New files generated for "%s":', $name); - $this->symfonyStyle->title($message); - \sort($generatedFilePaths); - foreach ($generatedFilePaths as $generatedFilePath) { - $fileInfo = new SmartFileInfo($generatedFilePath); - $relativeFilePath = $fileInfo->getRelativeFilePathFromCwd(); - $this->symfonyStyle->writeln(' * ' . $relativeFilePath); - } - $message = \sprintf('Make tests green again:%svendor/bin/phpunit %s', \PHP_EOL . \PHP_EOL, $testCaseFilePath); - $this->symfonyStyle->success($message); - } - private function isGeneratedFilePathTestCase(string $generatedFilePath) : bool - { - if (\substr_compare($generatedFilePath, 'Test.php', -\strlen('Test.php')) === 0) { - return \true; - } - if (\substr_compare($generatedFilePath, 'Test.php.inc', -\strlen('Test.php.inc')) !== 0) { - return \false; - } - return \defined('PHPUNIT_COMPOSER_INSTALL'); - } -} diff --git a/vendor/rector/rector-generator/src/Command/InitRecipeCommand.php b/vendor/rector/rector-generator/src/Command/InitRecipeCommand.php deleted file mode 100644 index 37eec078957..00000000000 --- a/vendor/rector/rector-generator/src/Command/InitRecipeCommand.php +++ /dev/null @@ -1,32 +0,0 @@ -templateInitializer = $templateInitializer; - parent::__construct(); - } - protected function configure() : void - { - $this->setName('init-recipe'); - $this->setDescription('[DEV] Initialize "rector-recipe.php" config'); - } - protected function execute(InputInterface $input, OutputInterface $output) : int - { - $this->templateInitializer->initialize(__DIR__ . '/../../templates/rector-recipe.php', 'rector-recipe.php'); - return self::SUCCESS; - } -} diff --git a/vendor/rector/rector-generator/src/Enum/Packages.php b/vendor/rector/rector-generator/src/Enum/Packages.php deleted file mode 100644 index 9fba76d6a99..00000000000 --- a/vendor/rector/rector-generator/src/Enum/Packages.php +++ /dev/null @@ -1,12 +0,0 @@ -smartFileSystem = $smartFileSystem; - $this->templateFactory = $templateFactory; - } - /** - * @param array $templateVariables - */ - public function appendRectorServiceToSet(string $setFilePath, array $templateVariables, string $rectorFqnNamePattern) : void - { - $setFileContents = $this->smartFileSystem->readFile($setFilePath); - $this->ensureRequiredKeysAreSet($templateVariables); - // already added? - $servicesFullyQualifiedName = $this->templateFactory->create($rectorFqnNamePattern, $templateVariables); - if (\strpos($setFileContents, $servicesFullyQualifiedName) !== \false) { - return; - } - $registerServiceLine = \sprintf(';' . \PHP_EOL . ' $rectorConfig->rule(\\%s::class);' . \PHP_EOL . '};', $servicesFullyQualifiedName); - $setFileContents = Strings::replace($setFileContents, self::LAST_ITEM_REGEX, $registerServiceLine); - // 3. print the content back to file - $this->smartFileSystem->dumpFile($setFilePath, $setFileContents); - } - /** - * @param array $templateVariables - */ - private function ensureRequiredKeysAreSet(array $templateVariables) : void - { - $missingKeys = \array_diff(self::REQUIRED_KEYS, \array_keys($templateVariables)); - if ($missingKeys === []) { - return; - } - $message = \sprintf('Template variables for "%s" keys are missing', \implode('", "', $missingKeys)); - throw new ShouldNotHappenException($message); - } -} diff --git a/vendor/rector/rector-generator/src/FileSystem/TemplateFileSystem.php b/vendor/rector/rector-generator/src/FileSystem/TemplateFileSystem.php deleted file mode 100644 index 3d8017fe0f0..00000000000 --- a/vendor/rector/rector-generator/src/FileSystem/TemplateFileSystem.php +++ /dev/null @@ -1,86 +0,0 @@ -templateFactory = $templateFactory; - } - /** - * @param array $templateVariables - */ - public function resolveDestination(SmartFileInfo $smartFileInfo, array $templateVariables, RectorRecipe $rectorRecipe, string $targetDirectory) : string - { - $destination = $smartFileInfo->getRelativeFilePathFromDirectory(TemplateFinder::TEMPLATES_DIRECTORY); - $destination = $this->changeRootPathForRootPackage($rectorRecipe, $destination); - // normalize core package - if (!$rectorRecipe->isRectorRepository()) { - // special keyword for 3rd party Rectors, not for core Github contribution - $destination = Strings::replace($destination, self::PACKAGE_RULES_PATH_REGEX, 'utils/rector/src'); - $destination = Strings::replace($destination, self::PACKAGE_RULES_TESTS_PATH_REGEX, 'utils/rector/tests'); - } - // remove _Configured|_Extra prefix - $destination = $this->templateFactory->create($destination, $templateVariables); - $destination = Strings::replace($destination, self::CONFIGURED_OR_EXTRA_REGEX, ''); - // remove ".inc" protection from PHPUnit if not a test case - if ($this->isNonFixtureFileWithIncSuffix($destination)) { - $destination = Strings::before($destination, '.inc'); - } - // special hack for tests, so PHPUnit doesn't load the generated file as a test case - /** @var string $destination */ - if (\substr_compare($destination, 'Test.php', -\strlen('Test.php')) === 0 && \defined('PHPUNIT_COMPOSER_INSTALL')) { - $destination .= '.inc'; - } - return $targetDirectory . \DIRECTORY_SEPARATOR . $destination; - } - private function isNonFixtureFileWithIncSuffix(string $filePath) : bool - { - if (Strings::match($filePath, self::FIXTURE_SHORT_REGEX) !== null) { - return \false; - } - return \substr_compare($filePath, '.inc', -\strlen('.inc')) === 0; - } - private function changeRootPathForRootPackage(RectorRecipe $rectorRecipe, string $destination) : string - { - // rector split package? path are in the root directory - if (!\in_array($rectorRecipe->getPackage(), Packages::RECTOR_CORE, \true)) { - return $destination; - } - $destination = \str_replace('rules/__Package__', 'src', $destination); - return \str_replace('rules-tests/__Package__', 'tests', $destination); - } -} diff --git a/vendor/rector/rector-generator/src/Finder/TemplateFinder.php b/vendor/rector/rector-generator/src/Finder/TemplateFinder.php deleted file mode 100644 index c4028ce5552..00000000000 --- a/vendor/rector/rector-generator/src/Finder/TemplateFinder.php +++ /dev/null @@ -1,72 +0,0 @@ -finderSanitizer = $finderSanitizer; - $this->fileSystemGuard = $fileSystemGuard; - } - /** - * @return SmartFileInfo[] - */ - public function find(RectorRecipe $rectorRecipe) : array - { - $filePaths = []; - $filePaths = $this->addRuleAndTestCase($rectorRecipe, $filePaths); - $filePaths[] = __DIR__ . '/../../templates/rules-tests/__Package__/Rector/__Category__/__Name__/Fixture/some_class.php.inc'; - $this->ensureFilePathsExists($filePaths); - return $this->finderSanitizer->sanitize($filePaths); - } - /** - * @param string[] $filePaths - * @return string[] - * - * @note the ".inc" suffix is needed, so PHPUnit doens't load it as a test case - */ - private function addRuleAndTestCase(RectorRecipe $rectorRecipe, array $filePaths) : array - { - if ($rectorRecipe->getConfiguration() !== []) { - $filePaths[] = __DIR__ . '/../../templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/__Configuredconfigured_rule.php'; - } else { - $filePaths[] = __DIR__ . '/../../templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/configured_rule.php'; - } - $filePaths[] = __DIR__ . '/../../templates/rules-tests/__Package__/Rector/__Category__/__Name__/__Name__Test.php.inc'; - if ($rectorRecipe->getConfiguration() !== []) { - $filePaths[] = __DIR__ . '/../../templates/rules/__Package__/Rector/__Category__/__Configured__Name__.php'; - } else { - $filePaths[] = __DIR__ . '/../../templates/rules/__Package__/Rector/__Category__/__Name__.php'; - } - return $filePaths; - } - /** - * @param string[] $filePaths - */ - private function ensureFilePathsExists(array $filePaths) : void - { - foreach ($filePaths as $filePath) { - $this->fileSystemGuard->ensureFileExists($filePath, __METHOD__); - } - } -} diff --git a/vendor/rector/rector-generator/src/Generator/FileGenerator.php b/vendor/rector/rector-generator/src/Generator/FileGenerator.php deleted file mode 100644 index 10310e967e6..00000000000 --- a/vendor/rector/rector-generator/src/Generator/FileGenerator.php +++ /dev/null @@ -1,83 +0,0 @@ -smartFileSystem = $smartFileSystem; - $this->templateFactory = $templateFactory; - $this->templateFileSystem = $templateFileSystem; - } - /** - * @param SmartFileInfo[] $templateFileInfos - * @param array $templateVariables - * @return string[] - */ - public function generateFiles(array $templateFileInfos, array $templateVariables, RectorRecipe $rectorRecipe, string $destinationDirectory) : array - { - $generatedFilePaths = []; - foreach ($templateFileInfos as $templateFileInfo) { - $generatedFilePaths[] = $this->generateFileInfoWithTemplateVariables($templateFileInfo, $templateVariables, $rectorRecipe, $destinationDirectory); - } - return $generatedFilePaths; - } - /** - * @param array $templateVariables - */ - private function generateFileInfoWithTemplateVariables(SmartFileInfo $smartFileInfo, array $templateVariables, RectorRecipe $rectorRecipe, string $targetDirectory) : string - { - $targetFilePath = $this->templateFileSystem->resolveDestination($smartFileInfo, $templateVariables, $rectorRecipe, $targetDirectory); - $content = $this->templateFactory->create($smartFileInfo->getContents(), $templateVariables); - // replace "Rector\Utils\" with "Utils\Rector\" for 3rd party packages - if (!$rectorRecipe->isRectorRepository()) { - $content = Strings::replace($content, self::RECTOR_UTILS_REGEX, 'Utils\\Rector'); - $content = Strings::replace($content, self::RECTOR_UTILS_TESTS_REGEX, 'Utils\\Rector\\Tests'); - } - // correct tests PSR-4 namespace for core rector packages - if (\in_array($rectorRecipe->getPackage(), Packages::RECTOR_CORE, \true)) { - $content = Strings::replace($content, '#namespace Rector\\\\Tests\\\\' . $rectorRecipe->getPackage() . '#', 'namespace Rector\\' . $rectorRecipe->getPackage() . '\\Tests'); - // add core package main config - if (\substr_compare($targetFilePath, 'configured_rule.php', -\strlen('configured_rule.php')) === 0) { - $rectorConfigLine = 'return static function (RectorConfig $rectorConfig): void {'; - $content = \str_replace($rectorConfigLine, $rectorConfigLine . \PHP_EOL . ' $rectorConfig->import(__DIR__ . \'/../../../../../config/config.php\');' . \PHP_EOL, $content); - } - } - $this->smartFileSystem->dumpFile($targetFilePath, $content); - return $targetFilePath; - } -} diff --git a/vendor/rector/rector-generator/src/Generator/RectorGenerator.php b/vendor/rector/rector-generator/src/Generator/RectorGenerator.php deleted file mode 100644 index d48dd6f976d..00000000000 --- a/vendor/rector/rector-generator/src/Generator/RectorGenerator.php +++ /dev/null @@ -1,64 +0,0 @@ -templateFinder = $templateFinder; - $this->templateVariablesFactory = $templateVariablesFactory; - $this->fileGenerator = $fileGenerator; - $this->overrideGuard = $overrideGuard; - $this->symfonyStyle = $symfonyStyle; - } - /** - * @return string[] - */ - public function generate(RectorRecipe $rectorRecipe, string $destinationDirectory) : array - { - // generate and compare - $templateFileInfos = $this->templateFinder->find($rectorRecipe); - $templateVariables = $this->templateVariablesFactory->createFromRectorRecipe($rectorRecipe); - $isUnwantedOverride = $this->overrideGuard->isUnwantedOverride($templateFileInfos, $templateVariables, $rectorRecipe, $destinationDirectory); - if ($isUnwantedOverride) { - $this->symfonyStyle->warning('No files were changed'); - return []; - } - return $this->fileGenerator->generateFiles($templateFileInfos, $templateVariables, $rectorRecipe, $destinationDirectory); - } -} diff --git a/vendor/rector/rector-generator/src/Guard/OverrideGuard.php b/vendor/rector/rector-generator/src/Guard/OverrideGuard.php deleted file mode 100644 index 2226e205585..00000000000 --- a/vendor/rector/rector-generator/src/Guard/OverrideGuard.php +++ /dev/null @@ -1,50 +0,0 @@ -symfonyStyle = $symfonyStyle; - $this->templateFileSystem = $templateFileSystem; - } - /** - * @param array $templateVariables - * @param SmartFileInfo[] $templateFileInfos - */ - public function isUnwantedOverride(array $templateFileInfos, array $templateVariables, RectorRecipe $rectorRecipe, string $targetDirectory) : bool - { - $message = \sprintf('Files for "%s" rule already exist. Should we override them?', $rectorRecipe->getName()); - foreach ($templateFileInfos as $templateFileInfo) { - if (!$this->doesFileInfoAlreadyExist($templateVariables, $rectorRecipe, $templateFileInfo, $targetDirectory)) { - continue; - } - return !$this->symfonyStyle->confirm($message); - } - return \false; - } - /** - * @param array $templateVariables - */ - private function doesFileInfoAlreadyExist(array $templateVariables, RectorRecipe $rectorRecipe, SmartFileInfo $templateFileInfo, string $targetDirectory) : bool - { - $destination = $this->templateFileSystem->resolveDestination($templateFileInfo, $templateVariables, $rectorRecipe, $targetDirectory); - return \file_exists($destination); - } -} diff --git a/vendor/rector/rector-generator/src/NodeFactory/ConfigurationNodeFactory.php b/vendor/rector/rector-generator/src/NodeFactory/ConfigurationNodeFactory.php deleted file mode 100644 index 1adfd708372..00000000000 --- a/vendor/rector/rector-generator/src/NodeFactory/ConfigurationNodeFactory.php +++ /dev/null @@ -1,33 +0,0 @@ -nodeFactory = $nodeFactory; - } - /** - * @param array $ruleConfiguration - * @return Property[] - */ - public function createProperties(array $ruleConfiguration) : array - { - $properties = []; - foreach (\array_keys($ruleConfiguration) as $privatePropertyName) { - $property = $this->nodeFactory->createPrivateArrayProperty($privatePropertyName); - $property->props[0]->default = new Array_([]); - $properties[] = $property; - } - return $properties; - } -} diff --git a/vendor/rector/rector-generator/src/NodeFactory/ConfigureClassMethodFactory.php b/vendor/rector/rector-generator/src/NodeFactory/ConfigureClassMethodFactory.php deleted file mode 100644 index 2253e6914f3..00000000000 --- a/vendor/rector/rector-generator/src/NodeFactory/ConfigureClassMethodFactory.php +++ /dev/null @@ -1,48 +0,0 @@ -nodeFactory = $nodeFactory; - } - /** - * @param array $ruleConfiguration - */ - public function create(array $ruleConfiguration) : ClassMethod - { - $classMethod = $this->nodeFactory->createPublicMethod('configure'); - $classMethod->returnType = new Identifier('void'); - $configurationVariable = new Variable('configuration'); - $configurationParam = new Param($configurationVariable); - $configurationParam->type = new Identifier('array'); - $classMethod->params[] = $configurationParam; - $assigns = []; - foreach (\array_keys($ruleConfiguration) as $propertyName) { - $assign = $this->nodeFactory->createPropertyAssign($propertyName, $configurationVariable); - $assigns[] = new Expression($assign); - } - $classMethod->stmts = $assigns; - $paramDoc = <<<'CODE_SAMPLE' -/** - * @param mixed[] $configuration - */ -CODE_SAMPLE; - $classMethod->setDocComment(new Doc($paramDoc)); - return $classMethod; - } -} diff --git a/vendor/rector/rector-generator/src/NodeFactory/NodeFactory.php b/vendor/rector/rector-generator/src/NodeFactory/NodeFactory.php deleted file mode 100644 index 0fb6c170f6f..00000000000 --- a/vendor/rector/rector-generator/src/NodeFactory/NodeFactory.php +++ /dev/null @@ -1,64 +0,0 @@ - $values - */ - public function createArray(array $values) : Array_ - { - $arrayItems = []; - foreach ($values as $key => $value) { - // natural key, no need for value - if (\is_int($key)) { - $arrayItems[] = new ArrayItem(BuilderHelpers::normalizeValue($value)); - } else { - $arrayItems[] = new ArrayItem(BuilderHelpers::normalizeValue($value), BuilderHelpers::normalizeValue($key)); - } - } - return new Array_($arrayItems); - } - public function createClassConstReference(string $class) : ClassConstFetch - { - $fullyQualified = new FullyQualified($class); - return new ClassConstFetch($fullyQualified, 'class'); - } - public function createPropertyAssign(string $propertyName, Expr $expr) : Assign - { - $propertyFetch = new PropertyFetch(new Variable('this'), $propertyName); - return new Assign($propertyFetch, $expr); - } - public function createPublicMethod(string $methodName) : ClassMethod - { - $methodBuilder = new Method($methodName); - $methodBuilder->makePublic(); - return $methodBuilder->getNode(); - } - public function createPrivateArrayProperty(string $propertyName) : Property - { - $propertyBuilder = new \PhpParser\Builder\Property($propertyName); - $propertyBuilder->makePrivate(); - $docContent = <<<'CODE_SAMPLE' -/** - * @var mixed[] - */ -CODE_SAMPLE; - $propertyBuilder->setDocComment($docContent); - return $propertyBuilder->getNode(); - } -} diff --git a/vendor/rector/rector-generator/src/Provider/RectorRecipeProvider.php b/vendor/rector/rector-generator/src/Provider/RectorRecipeProvider.php deleted file mode 100644 index b3ee62b5456..00000000000 --- a/vendor/rector/rector-generator/src/Provider/RectorRecipeProvider.php +++ /dev/null @@ -1,46 +0,0 @@ - $rectorRecipeConfiguration - */ - public function __construct(array $rectorRecipeConfiguration = []) - { - // no configuration provided - due to autowiring - if ($rectorRecipeConfiguration === []) { - return; - } - $rectorRecipe = new RectorRecipe($rectorRecipeConfiguration[Option::PACKAGE], $rectorRecipeConfiguration[Option::NAME], $rectorRecipeConfiguration[Option::NODE_TYPES], $rectorRecipeConfiguration[Option::DESCRIPTION], $rectorRecipeConfiguration[Option::CODE_BEFORE], $rectorRecipeConfiguration[Option::CODE_AFTER]); - // optional parameters - if (isset($rectorRecipeConfiguration[Option::CONFIGURATION])) { - $rectorRecipe->setConfiguration($rectorRecipeConfiguration[Option::CONFIGURATION]); - } - if (isset($rectorRecipeConfiguration[Option::RESOURCES])) { - $rectorRecipe->setResources($rectorRecipeConfiguration[Option::RESOURCES]); - } - if (isset($rectorRecipeConfiguration[Option::SET_FILE_PATH])) { - $rectorRecipe->setSetFilePath($rectorRecipeConfiguration[Option::SET_FILE_PATH]); - } - $this->rectorRecipe = $rectorRecipe; - } - public function provide() : RectorRecipe - { - if (!$this->rectorRecipe instanceof RectorRecipe) { - throw new ConfigurationException('Make sure the "rector-recipe.php" config file is imported and parameter set. Are you sure its in your main config?'); - } - return $this->rectorRecipe; - } -} diff --git a/vendor/rector/rector-generator/src/TemplateFactory.php b/vendor/rector/rector-generator/src/TemplateFactory.php deleted file mode 100644 index 557a6a85a03..00000000000 --- a/vendor/rector/rector-generator/src/TemplateFactory.php +++ /dev/null @@ -1,17 +0,0 @@ - $variables - */ - public function create(string $content, array $variables) : string - { - $variableKeys = \array_keys($variables); - $variableValues = \array_values($variables); - return \str_replace($variableKeys, $variableValues, $content); - } -} diff --git a/vendor/rector/rector-generator/src/TemplateInitializer.php b/vendor/rector/rector-generator/src/TemplateInitializer.php deleted file mode 100644 index ad61e1b4279..00000000000 --- a/vendor/rector/rector-generator/src/TemplateInitializer.php +++ /dev/null @@ -1,46 +0,0 @@ -symfonyStyle = $symfonyStyle; - $this->smartFileSystem = $smartFileSystem; - $this->fileSystemGuard = $fileSystemGuard; - } - public function initialize(string $templateFilePath, string $rootFileName) : void - { - $this->fileSystemGuard->ensureFileExists($templateFilePath, __METHOD__); - $targetFilePath = \getcwd() . '/' . $rootFileName; - $doesFileExist = $this->smartFileSystem->exists($targetFilePath); - if ($doesFileExist) { - $message = \sprintf('Config file "%s" already exists', $rootFileName); - $this->symfonyStyle->warning($message); - } else { - $this->smartFileSystem->copy($templateFilePath, $targetFilePath); - $message = \sprintf('"%s" config file was added', $rootFileName); - $this->symfonyStyle->success($message); - } - } -} diff --git a/vendor/rector/rector-generator/src/TemplateVariablesFactory.php b/vendor/rector/rector-generator/src/TemplateVariablesFactory.php deleted file mode 100644 index 3bd0a93f1d0..00000000000 --- a/vendor/rector/rector-generator/src/TemplateVariablesFactory.php +++ /dev/null @@ -1,142 +0,0 @@ -standard = $standard; - $this->configurationNodeFactory = $configurationNodeFactory; - $this->configureClassMethodFactory = $configureClassMethodFactory; - $this->nodeFactory = $nodeFactory; - } - /** - * @return array - */ - public function createFromRectorRecipe(RectorRecipe $rectorRecipe) : array - { - $data = [Placeholder::PACKAGE => $rectorRecipe->getPackage(), Placeholder::CATEGORY => $rectorRecipe->getCategory(), Placeholder::DESCRIPTION => $rectorRecipe->getDescription(), Placeholder::NAME => $rectorRecipe->getName(), Placeholder::CODE_BEFORE => \trim($rectorRecipe->getCodeBefore()) . \PHP_EOL, Placeholder::CODE_BEFORE_EXAMPLE => $this->createCodeForDefinition($rectorRecipe->getCodeBefore()), Placeholder::CODE_AFTER => \trim($rectorRecipe->getCodeAfter()) . \PHP_EOL, Placeholder::CODE_AFTER_EXAMPLE => $this->createCodeForDefinition($rectorRecipe->getCodeAfter()), Placeholder::RESOURCES => $this->createSourceDocBlock($rectorRecipe->getResources())]; - if ($rectorRecipe->getConfiguration() !== []) { - $configurationData = $this->createConfigurationData($rectorRecipe); - $data = \array_merge($data, $configurationData); - } - $data['__NodeTypesPhp__'] = $this->createNodeTypePhp($rectorRecipe); - $data['__NodeTypesDoc__'] = '\\' . \implode('|\\', $rectorRecipe->getNodeTypes()); - return $data; - } - private function createCodeForDefinition(string $code) : string - { - if (\strpos($code, \PHP_EOL) !== \false) { - // multi lines - return \sprintf("<<<'CODE_SAMPLE'%s%s%sCODE_SAMPLE%s", \PHP_EOL, $code, \PHP_EOL, \PHP_EOL); - } - // single line - return "'" . \str_replace("'", '"', $code) . "'"; - } - /** - * @param string[] $source - */ - private function createSourceDocBlock(array $source) : string - { - if ($source === []) { - return ''; - } - $sourceAsString = ''; - foreach ($source as $singleSource) { - $sourceAsString .= ' * @changelog ' . $singleSource . \PHP_EOL; - } - $sourceAsString .= ' *'; - return \rtrim($sourceAsString); - } - /** - * @param array $configuration - */ - private function createRuleConfiguration(array $configuration) : string - { - $arrayItems = []; - foreach ($configuration as $singleConfiguration) { - $singleConfiguration = BuilderHelpers::normalizeValue($singleConfiguration); - $arrayItems[] = new ArrayItem($singleConfiguration); - } - $array = new Array_($arrayItems); - return $this->standard->prettyPrintExpr($array); - } - /** - * @param array $ruleConfiguration - */ - private function createConfigurationProperty(array $ruleConfiguration) : string - { - $properties = $this->configurationNodeFactory->createProperties($ruleConfiguration); - return $this->standard->prettyPrint($properties); - } - /** - * @param array $ruleConfiguration - */ - private function createConfigureClassMethod(array $ruleConfiguration) : string - { - $classMethod = $this->configureClassMethodFactory->create($ruleConfiguration); - return $this->standard->prettyPrint([$classMethod]); - } - private function createNodeTypePhp(RectorRecipe $rectorRecipe) : string - { - $referencingClassConsts = []; - foreach ($rectorRecipe->getNodeTypes() as $nodeType) { - $referencingClassConsts[] = $this->nodeFactory->createClassConstReference($nodeType); - } - $array = $this->nodeFactory->createArray($referencingClassConsts); - return $this->standard->prettyPrintExpr($array); - } - /** - * @return array - */ - private function createConfigurationData(RectorRecipe $rectorRecipe) : array - { - $configurationData = []; - $configurationData['__TestRuleConfiguration__'] = $this->createRuleConfiguration($rectorRecipe->getConfiguration()); - $configurationData['__RuleConfiguration__'] = $this->createRuleConfiguration($rectorRecipe->getConfiguration()); - $configurationData['__ConfigurationProperties__'] = $this->createConfigurationProperty($rectorRecipe->getConfiguration()); - $configurationData['__ConfigureClassMethod__'] = $this->createConfigureClassMethod($rectorRecipe->getConfiguration()); - $configurationData['__MainConfiguration__'] = $this->createMainConfiguration($rectorRecipe->getConfiguration()); - return $configurationData; - } - /** - * @param array $ruleConfiguration - */ - private function createMainConfiguration(array $ruleConfiguration) : string - { - $firstItem = \array_pop($ruleConfiguration); - $valueExpr = BuilderHelpers::normalizeValue($firstItem); - return $this->standard->prettyPrintExpr($valueExpr); - } -} diff --git a/vendor/rector/rector-generator/src/ValueObject/NamePattern.php b/vendor/rector/rector-generator/src/ValueObject/NamePattern.php deleted file mode 100644 index b603eba64fe..00000000000 --- a/vendor/rector/rector-generator/src/ValueObject/NamePattern.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ - private $configuration = []; - /** - * Use default package name, if not overriden manually - * @var string - */ - private $package = self::PACKAGE_UTILS; - /** - * @var string|null - */ - private $setFilePath; - /** - * @var string - */ - private $description; - /** - * @param array> $nodeTypes - */ - public function __construct(string $package, string $name, array $nodeTypes, string $description, string $codeBefore, string $codeAfter) - { - $this->description = $description; - $this->isRectorRepository = $this->detectRectorRepository(); - $this->setPackage($package); - $this->setName($name); - $this->setNodeTypes($nodeTypes); - if ($codeBefore === $codeAfter) { - throw new ConfigurationException('Code before and after are identical. They have to be different'); - } - $this->setCodeBefore($codeBefore); - $this->setCodeAfter($codeAfter); - $this->resolveCategory($nodeTypes); - } - public function getPackage() : string - { - return $this->package; - } - public function getName() : string - { - return $this->name; - } - /** - * @return class-string[] - */ - public function getNodeTypes() : array - { - return $this->nodeTypes; - } - public function getDescription() : string - { - return $this->description; - } - public function getCodeBefore() : string - { - return $this->codeBefore; - } - public function getCodeAfter() : string - { - return $this->codeAfter; - } - /** - * @return string[] - */ - public function getResources() : array - { - return $this->resources; - } - public function setSetFilePath(string $setFilePath) : void - { - $this->setFilePath = $setFilePath; - } - public function getSetFilePath() : ?string - { - return $this->setFilePath; - } - /** - * @return array - */ - public function getConfiguration() : array - { - return $this->configuration; - } - public function isRectorRepository() : bool - { - return $this->isRectorRepository; - } - public function getCategory() : string - { - return $this->category; - } - /** - * @api - * @param array $configuration - */ - public function setConfiguration(array $configuration) : void - { - $this->configuration = $configuration; - } - /** - * @api - * @param string[] $resources - */ - public function setResources(array $resources) : void - { - $this->resources = \array_filter($resources); - } - /** - * For testing purposes - * - * @api - */ - public function setIsRectorRepository(bool $isRectorRepository) : void - { - $this->isRectorRepository = $isRectorRepository; - } - /** - * For tests - * - * @api - */ - public function setPackage(string $package) : void - { - if (\is_file($package)) { - $message = \sprintf('The "%s()" method only accepts package name, file path "%s" given', __METHOD__, $package); - throw new ShouldNotHappenException($message); - } - $this->package = $package; - } - private function setName(string $name) : void - { - if (\substr_compare($name, 'Rector', -\strlen('Rector')) !== 0) { - $message = \sprintf('Rector name "%s" must end with "Rector"', $name); - throw new ConfigurationException($message); - } - $this->name = $name; - } - /** - * @param class-string[] $nodeTypes - */ - private function setNodeTypes(array $nodeTypes) : void - { - foreach ($nodeTypes as $nodeType) { - // avoid phpstan class method that is never traversed - Assert::isNotA($nodeType, ClassMethod::class); - if (\is_a($nodeType, Node::class, \true)) { - continue; - } - $message = \sprintf('Node type "%s" does not exist, implement "%s" interface or is not imported in "rector-recipe.php"', $nodeType, Node::class); - throw new ShouldNotHappenException($message); - } - if (\count($nodeTypes) < 1) { - $message = \sprintf('"$nodeTypes" argument requires at least one item, e.g. "%s"', FuncCall::class); - throw new ConfigurationException($message); - } - $this->nodeTypes = $nodeTypes; - } - private function setCodeBefore(string $codeBefore) : void - { - $this->codeBefore = $this->normalizeCode($codeBefore); - } - private function setCodeAfter(string $codeAfter) : void - { - $this->codeAfter = $this->normalizeCode($codeAfter); - } - /** - * @param string[] $nodeTypes - */ - private function resolveCategory(array $nodeTypes) : void - { - $this->category = (string) Strings::after($nodeTypes[0], '\\', -1); - } - private function normalizeCode(string $code) : string - { - if (\strncmp($code, 'services(); - // [REQUIRED] - $rectorRecipeConfiguration = [ - // [RECTOR CORE CONTRIBUTION - REQUIRED] - // package name, basically namespace part in `rules//src`, use PascalCase - Option::PACKAGE => 'Naming', - // name, basically short class name; use PascalCase - Option::NAME => 'RenameMethodCallRector', - // 1+ node types to change, pick from classes here https://github.com/nikic/PHP-Parser/tree/master/lib/PhpParser/Node - // the best practise is to have just 1 type here if possible, and make separated rule for other node types - Option::NODE_TYPES => [MethodCall::class], - // describe what the rule does - Option::DESCRIPTION => '"something()" will be renamed to "somethingElse()"', - // code before change - // this is used for documentation and first test fixture - Option::CODE_BEFORE => <<<'CODE_SAMPLE' -class SomeClass -{ - public function run() - { - $this->something(); - } -} -CODE_SAMPLE -, - // code after change - Option::CODE_AFTER => <<<'CODE_SAMPLE' -class SomeClass -{ - public function run() - { - $this->somethingElse(); - } -} -CODE_SAMPLE -, - ]; - $services->set(RectorRecipeProvider::class)->arg('$rectorRecipeConfiguration', $rectorRecipeConfiguration); -}; diff --git a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/Fixture/some_class.php.inc b/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/Fixture/some_class.php.inc deleted file mode 100644 index cc9a0153a18..00000000000 --- a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/Fixture/some_class.php.inc +++ /dev/null @@ -1,13 +0,0 @@ - ------ - diff --git a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/__Name__Test.php.inc b/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/__Name__Test.php.inc deleted file mode 100644 index 6cb10b321cb..00000000000 --- a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/__Name__Test.php.inc +++ /dev/null @@ -1,31 +0,0 @@ -doTestFileInfo($fileInfo); - } - - /** - * @return \Iterator<\Symplify\SmartFileSystem\SmartFileInfo> - */ - public function provideData(): \Iterator - { - return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/configured_rule.php'; - } -} diff --git a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/__Configuredconfigured_rule.php b/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/__Configuredconfigured_rule.php deleted file mode 100644 index ec83bffe919..00000000000 --- a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/__Configuredconfigured_rule.php +++ /dev/null @@ -1,9 +0,0 @@ -ruleWithConfiguration(\Rector\__Package__\Rector\__Category__\__Name__::class, \RectorPrefix202208\__MainConfiguration__); -}; diff --git a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/configured_rule.php b/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/configured_rule.php deleted file mode 100644 index 99ec3e3c443..00000000000 --- a/vendor/rector/rector-generator/templates/rules-tests/__Package__/Rector/__Category__/__Name__/config/configured_rule.php +++ /dev/null @@ -1,9 +0,0 @@ -rule(\Rector\__Package__\Rector\__Category__\__Name__::class); -}; diff --git a/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Configured__Name__.php b/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Configured__Name__.php deleted file mode 100644 index 846c409dadc..00000000000 --- a/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Configured__Name__.php +++ /dev/null @@ -1,51 +0,0 @@ -> - */ - public function getNodeTypes(): array - { - return __NodeTypesPhp__; - } - - /** - * @param __NodeTypesDoc__ $node - */ - public function refactor(Node $node): ?Node - { - // change the node - - return $node; - } - - __ConfigureClassMethod__ -} diff --git a/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Name__.php b/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Name__.php deleted file mode 100644 index f9917e546ee..00000000000 --- a/vendor/rector/rector-generator/templates/rules/__Package__/Rector/__Category__/__Name__.php +++ /dev/null @@ -1,35 +0,0 @@ -> - */ - public function getNodeTypes() : array - { - return __NodeTypesPhp__; - } - /** - * @param __NodeTypesDoc__ $node - */ - public function refactor(Node $node) : ?Node - { - // change the node - return $node; - } -} diff --git a/vendor/rector/rector-phpunit/src/NodeAnalyzer/AssertCallAnalyzer.php b/vendor/rector/rector-phpunit/src/NodeAnalyzer/AssertCallAnalyzer.php index 78cdee3bee6..8d0f15f1d5f 100644 --- a/vendor/rector/rector-phpunit/src/NodeAnalyzer/AssertCallAnalyzer.php +++ b/vendor/rector/rector-phpunit/src/NodeAnalyzer/AssertCallAnalyzer.php @@ -7,8 +7,8 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\PrettyPrinter\Standard; use PHPStan\Type\TypeWithClassName; +use Rector\Core\Contract\PhpParser\NodePrinterInterface; use Rector\Core\PhpParser\AstResolver; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeNameResolver\NodeNameResolver; @@ -36,9 +36,9 @@ final class AssertCallAnalyzer private $astResolver; /** * @readonly - * @var \PhpParser\PrettyPrinter\Standard + * @var \Rector\Core\Contract\PhpParser\NodePrinterInterface */ - private $printerStandard; + private $nodePrinter; /** * @readonly * @var \Rector\Core\PhpParser\Node\BetterNodeFinder @@ -54,10 +54,10 @@ final class AssertCallAnalyzer * @var \Rector\NodeTypeResolver\NodeTypeResolver */ private $nodeTypeResolver; - public function __construct(AstResolver $astResolver, Standard $printerStandard, BetterNodeFinder $betterNodeFinder, NodeNameResolver $nodeNameResolver, NodeTypeResolver $nodeTypeResolver) + public function __construct(AstResolver $astResolver, NodePrinterInterface $nodePrinter, BetterNodeFinder $betterNodeFinder, NodeNameResolver $nodeNameResolver, NodeTypeResolver $nodeTypeResolver) { $this->astResolver = $astResolver; - $this->printerStandard = $printerStandard; + $this->nodePrinter = $nodePrinter; $this->betterNodeFinder = $betterNodeFinder; $this->nodeNameResolver = $nodeNameResolver; $this->nodeTypeResolver = $nodeTypeResolver; @@ -73,7 +73,7 @@ final class AssertCallAnalyzer if ($this->classMethodNestingLevel > self::MAX_NESTED_METHOD_CALL_LEVEL) { return \false; } - $cacheHash = \md5($this->printerStandard->prettyPrint([$classMethod])); + $cacheHash = \md5($this->nodePrinter->prettyPrint([$classMethod])); if (isset($this->containsAssertCallByClassMethod[$cacheHash])) { return $this->containsAssertCallByClassMethod[$cacheHash]; }