{ "name": "rector/rector", "description": "Instant upgrade and refactoring of your PHP code", "keywords": [ "instant upgrades", "instant refactoring", "ast", "automated refactoring" ], "homepage": "https://getrector.org", "license": "MIT", "authors": [ { "name": "Tomas Votruba", "email": "tomas.vot@gmail.com", "homepage": "https://tomasvotruba.com" }, { "name": "Jan Mikes", "email": "j.mikes@me.com", "homepage": "https://janmikes.cz" } ], "bin": [ "bin/rector" ], "require": { "php": "^7.3|^8.0", "ext-dom": "*", "ext-json": "*", "composer/semver": "^3.2", "composer/xdebug-handler": "^1.4", "doctrine/annotations": "^1.11", "doctrine/inflector": "^2.0", "jean85/pretty-package-versions": "^1.5.1|^2.0.1", "nette/robot-loader": "^3.2", "nette/utils": "^3.2", "nikic/php-parser": "^4.10.4", "phpstan/phpdoc-parser": "^0.4.9", "phpstan/phpstan": "^0.12.69, <0.12.70", "phpstan/phpstan-phpunit": "^0.12.17", "psr/simple-cache": "^1.0", "sebastian/diff": "^4.0", "symfony/cache": "^4.4.8|^5.1", "symfony/console": "^4.4.8|^5.1", "symfony/dependency-injection": "^5.1", "symfony/expression-language": "^4.4|^5.1", "symfony/finder": "^4.4.8|^5.1", "symfony/http-kernel": "^4.4.8|^5.1", "symfony/process": "^4.4.8|^5.1", "symplify/astral": "^9.0.47", "symplify/autowire-array-parameter": "^9.0.47", "symplify/console-color-diff": "^9.0.47", "symplify/package-builder": "^9.0.47", "symplify/rule-doc-generator": "^9.0.47", "symplify/set-config-resolver": "^9.0.47", "symplify/simple-php-doc-parser": "^9.0.47", "symplify/skipper": "^9.0.47", "symplify/smart-file-system": "^9.0.47", "symplify/symfony-php-config": "^9.0.47", "webmozart/assert": "^1.9" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.18.2", "nette/application": "^3.0.7", "nette/di": "^3.0", "nette/forms": "^3.0", "ocramius/package-versions": "^1.9", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-nette": "^0.12.12", "phpunit/phpunit": "^9.5", "sebastian/diff": "^4.0.4", "symfony/security-core": "^5.2", "symfony/security-http": "^5.2", "symplify/changelog-linker": "^9.0.47", "symplify/coding-standard": "^9.0.47", "symplify/easy-coding-standard": "^9.0.47", "symplify/easy-testing": "^9.0.47", "symplify/phpstan-extensions": "^9.0.47", "symplify/phpstan-rules": "^9.0.47", "tracy/tracy": "^2.8" }, "replace": { "rector/rector-prefixed": "self.version" }, "autoload": { "psr-4": { "Rector\\Testing\\": "packages/testing/src", "Rector\\Comments\\": "packages/comments/src", "Rector\\AttributeAwarePhpDoc\\": "packages/attribute-aware-php-doc/src", "Rector\\Autodiscovery\\": "rules/autodiscovery/src", "Rector\\BetterPhpDocParser\\": "packages/better-php-doc-parser/src", "Rector\\Caching\\": "packages/caching/src", "Rector\\CakePHP\\": "rules/cakephp/src", "Rector\\ChangesReporting\\": "packages/changes-reporting/src", "Rector\\CodeQuality\\": "rules/code-quality/src", "Rector\\CodingStyle\\": "rules/coding-style/src", "Rector\\Composer\\": "rules/composer/src", "Rector\\Core\\": "src", "Rector\\DeadCode\\": "rules/dead-code/src", "Rector\\DependencyInjection\\": "rules/dependency-injection/src", "Rector\\EarlyReturn\\": "rules/early-return/src", "Rector\\DeadDocBlock\\": "rules/dead-doc-block/src", "Rector\\DoctrineAnnotationGenerated\\": "packages/doctrine-annotation-generated/src", "Rector\\DoctrineCodeQuality\\": "rules/doctrine-code-quality/src", "Rector\\DoctrineGedmoToKnplabs\\": "rules/doctrine-gedmo-to-knplabs/src", "Rector\\Doctrine\\": "rules/doctrine/src", "Rector\\DowngradePhp70\\": "rules/downgrade-php70/src", "Rector\\DowngradePhp71\\": "rules/downgrade-php71/src", "Rector\\DowngradePhp72\\": "rules/downgrade-php72/src", "Rector\\DowngradePhp73\\": "rules/downgrade-php73/src", "Rector\\ReadWrite\\": "packages/read-write/src", "Rector\\DowngradePhp74\\": "rules/downgrade-php74/src", "Rector\\DowngradePhp80\\": "rules/downgrade-php80/src", "Rector\\FamilyTree\\": "packages/family-tree/src", "Rector\\FileSystemRector\\": "packages/file-system-rector/src", "Rector\\Generic\\": "rules/generic/src", "Rector\\Laravel\\": "rules/laravel/src", "Rector\\Legacy\\": "rules/legacy/src", "Rector\\MockeryToProphecy\\": "rules/mockery-to-prophecy/src", "Rector\\MockistaToMockery\\": "rules/mockista-to-mockery/src", "Rector\\MysqlToMysqli\\": "rules/mysql-to-mysqli/src", "Rector\\Naming\\": "rules/naming/src", "Rector\\NetteCodeQuality\\": "rules/nette-code-quality/src", "Rector\\NetteKdyby\\": "rules/nette-kdyby/src", "Rector\\NetteTesterToPHPUnit\\": "rules/nette-tester-to-phpunit/src", "Rector\\NetteToSymfony\\": "rules/nette-to-symfony/src", "Rector\\NetteUtilsCodeQuality\\": "rules/nette-utils-code-quality/src", "Rector\\Nette\\": "rules/nette/src", "Rector\\Defluent\\": "rules/defluent/src", "Rector\\NodeCollector\\": "packages/node-collector/src", "Rector\\NodeNameResolver\\": "packages/node-name-resolver/src", "Rector\\NodeNestingScope\\": "packages/node-nesting-scope/src", "Rector\\NodeRemoval\\": "packages/node-removal/src", "Rector\\NodeTypeResolver\\": "packages/node-type-resolver/src", "Rector\\Order\\": "rules/order/src", "Rector\\PHPOffice\\": "rules/php-office/src", "Rector\\PHPStanStaticTypeMapper\\": "packages/phpstan-static-type-mapper/src", "Rector\\PHPUnitSymfony\\": "rules/phpunit-symfony/src", "Rector\\PHPUnit\\": "rules/phpunit/src", "Rector\\PSR4\\": "rules/psr4/src", "Rector\\Php52\\": "rules/php52/src", "Rector\\Php53\\": "rules/php53/src", "Rector\\Php54\\": "rules/php54/src", "Rector\\Php55\\": "rules/php55/src", "Rector\\Php56\\": "rules/php56/src", "Rector\\Php70\\": "rules/php70/src", "Rector\\Php71\\": "rules/php71/src", "Rector\\Php72\\": "rules/php72/src", "Rector\\Php73\\": "rules/php73/src", "Rector\\Php74\\": "rules/php74/src", "Rector\\Php80\\": "rules/php80/src", "Rector\\PhpAttribute\\": "packages/php-attribute/src", "Rector\\PhpSpecToPHPUnit\\": "rules/php-spec-to-phpunit/src", "Rector\\Compiler\\": "utils/compiler/src", "Rector\\PostRector\\": "packages/post-rector/src", "Rector\\Visibility\\": "rules/visibility/src", "Rector\\Removing\\": "rules/removing/src", "Rector\\Privatization\\": "rules/privatization/src", "Rector\\RectorGenerator\\": "packages/rector-generator/src", "Rector\\RemovingStatic\\": "rules/removing-static/src", "Rector\\Renaming\\": "rules/renaming/src", "Rector\\Restoration\\": "rules/restoration/src", "Rector\\Sensio\\": "rules/sensio/src", "Rector\\Set\\": "packages/set/src", "Rector\\StaticTypeMapper\\": "packages/static-type-mapper/src", "Rector\\CodeQualityStrict\\": "rules/code-quality-strict/src", "Rector\\SymfonyCodeQuality\\": "rules/symfony-code-quality/src", "Rector\\SymfonyPhpConfig\\": "rules/symfony-php-config/src", "Rector\\Symfony\\": "rules/symfony/src", "Rector\\Symfony2\\": "rules/symfony2/src", "Rector\\Symfony3\\": "rules/symfony3/src", "Rector\\Symfony4\\": "rules/symfony4/src", "Rector\\Symfony5\\": "rules/symfony5/src", "Rector\\Transform\\": "rules/transform/src", "Rector\\Twig\\": "rules/twig/src", "Rector\\TypeDeclaration\\": "rules/type-declaration/src", "Rector\\VendorLocker\\": "packages/vendor-locker/src", "Rector\\Carbon\\": "rules/carbon/src", "Rector\\Generics\\": "rules/generics/src" } }, "autoload-dev": { "classmap": [ "rules/autodiscovery/tests/Rector/FileNode/MoveInterfacesToContractNamespaceDirectoryRector/Expected", "rules/autodiscovery/tests/Rector/FileNode/MoveServicesBySuffixToDirectoryRector/Expected", "rules/cakephp/tests/Rector/FileWithoutNamespace/ImplicitShortClassNameUseStatementRector/Source", "rules/cakephp/tests/Rector/Namespace_/AppUsesStaticCallToUseStatementRector/Source", "rules/psr4/tests/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector/Source", "rules/renaming/tests/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector/Source", "rules/symfony4/tests/Rector/MethodCall/ContainerGetToConstructorInjectionRector/Source" ], "files": [ "rules/restoration/tests/Rector/Use_/RestoreFullyQualifiedNameRector/Source/ShortClassOnly.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/AnotherClass.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/Foo.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/Function_/count.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/YetAnotherClass.php", "rules/coding-style/tests/Rector/Throw_/AnnotateThrowablesRector/Source/i_throw_an_exception.func.php", "rules/dead-code/tests/Rector/MethodCall/RemoveDefaultArgumentValueRector/Source/UserDefined.php", "rules/naming/tests/ValueObjectFactory/PropertyRenameFactory/Fixture/skip_some_class.php.inc", "rules/renaming/tests/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector/Source/ChangeMeAnotherNamespace.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/SkipClassImportingSameName.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/SkipSameNamedInterface.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/Manual_Twig_Filter.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/TwigFilter.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/Twig_Extension_Sandbox.php", "rules/transform/tests/Rector/FuncCall/FuncCallToMethodCallRector/Source/some_view_function.php", "rules/type-declaration/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Source/MyBar.php", "rules/type-declaration/tests/Rector/Property/CompleteVarDocTypePropertyRector/Source/EventDispatcher.php", "stubs/Nette/Localization/ITranslation.php", "vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php", "tests/debug_functions.php" ], "psr-4": { "Rector\\Autodiscovery\\Tests\\": "rules/autodiscovery/tests", "Rector\\BetterPhpDocParser\\Tests\\": "packages/better-php-doc-parser/tests", "Rector\\Caching\\Tests\\": "packages/caching/tests", "Rector\\CakePHP\\Tests\\": "rules/cakephp/tests", "Rector\\CodeQuality\\Tests\\": "rules/code-quality/tests", "Rector\\CodingStyle\\Tests\\": "rules/coding-style/tests", "Rector\\Composer\\Tests\\": "rules/composer/tests", "Rector\\Core\\Tests\\": "tests", "Rector\\EarlyReturn\\Tests\\": "rules/early-return/tests", "Rector\\DeadCode\\Tests\\": "rules/dead-code/tests", "Rector\\DependencyInjection\\Tests\\": "rules/dependency-injection/tests", "Rector\\DoctrineCodeQuality\\Tests\\": "rules/doctrine-code-quality/tests", "Rector\\DoctrineGedmoToKnplabs\\Tests\\": "rules/doctrine-gedmo-to-knplabs/tests", "Rector\\Comments\\Tests\\": "packages/comments/tests", "Rector\\Doctrine\\Tests\\": "rules/doctrine/tests", "Rector\\DowngradePhp70\\Tests\\": "rules/downgrade-php70/tests", "Rector\\Removing\\Tests\\": "rules/removing/tests", "Rector\\DowngradePhp71\\Tests\\": "rules/downgrade-php71/tests", "Rector\\DowngradePhp72\\Tests\\": "rules/downgrade-php72/tests", "Rector\\DowngradePhp73\\Tests\\": "rules/downgrade-php73/tests", "Rector\\DowngradePhp74\\Tests\\": "rules/downgrade-php74/tests", "Rector\\DowngradePhp80\\Tests\\": "rules/downgrade-php80/tests", "Rector\\FileSystemRector\\Tests\\": "packages/file-system-rector/tests", "Rector\\Generic\\Tests\\": "rules/generic/tests", "Rector\\Laravel\\Tests\\": "rules/laravel/tests", "Rector\\Legacy\\Tests\\": "rules/legacy/tests", "Rector\\Defluent\\Tests\\": "rules/defluent/tests", "Rector\\MockeryToProphecy\\Tests\\": "rules/mockery-to-prophecy/tests", "Rector\\MockistaToMockery\\Tests\\": "rules/mockista-to-mockery/tests", "Rector\\MysqlToMysqli\\Tests\\": "rules/mysql-to-mysqli/tests", "Rector\\Naming\\Tests\\": "rules/naming/tests", "Rector\\DeadDocBlock\\Tests\\": "rules/dead-doc-block/tests", "Rector\\NetteCodeQuality\\Tests\\": "rules/nette-code-quality/tests", "Rector\\NetteKdyby\\Tests\\": "rules/nette-kdyby/tests", "Rector\\NetteTesterToPHPUnit\\Tests\\": "rules/nette-tester-to-phpunit/tests", "Rector\\NetteToSymfony\\Tests\\": "rules/nette-to-symfony/tests", "Rector\\NetteUtilsCodeQuality\\Tests\\": "rules/nette-utils-code-quality/tests", "Rector\\Nette\\Tests\\": "rules/nette/tests", "Rector\\NodeTypeResolver\\Tests\\": "packages/node-type-resolver/tests", "Rector\\Order\\Tests\\": "rules/order/tests", "Rector\\PHPOffice\\Tests\\": "rules/php-office/tests", "Rector\\Visibility\\Tests\\": "rules/visibility/tests", "Rector\\PHPStanExtensions\\": "utils/phpstan-extensions/src", "Rector\\RuleDocGenerator\\": "utils/rule-doc-generator/src", "Rector\\PHPStanExtensions\\Tests\\": "utils/phpstan-extensions/tests", "Rector\\PHPStanStaticTypeMapper\\Tests\\": "packages/phpstan-static-type-mapper/tests", "Rector\\StaticTypeMapper\\Tests\\": "packages/static-type-mapper/tests", "Rector\\PHPUnitSymfony\\Tests\\": "rules/phpunit-symfony/tests", "Rector\\PHPUnit\\Tests\\": "rules/phpunit/tests", "Rector\\PSR4\\Tests\\": "rules/psr4/tests", "Rector\\Php52\\Tests\\": "rules/php52/tests", "Rector\\Php53\\Tests\\": "rules/php53/tests", "Rector\\Php54\\Tests\\": "rules/php54/tests", "Rector\\Php55\\Tests\\": "rules/php55/tests", "Rector\\Php56\\Tests\\": "rules/php56/tests", "Rector\\Php70\\Tests\\": "rules/php70/tests", "Rector\\Php71\\Tests\\": "rules/php71/tests", "Rector\\Php72\\Tests\\": "rules/php72/tests", "Rector\\Php73\\Tests\\": "rules/php73/tests", "Rector\\Php74\\Tests\\": "rules/php74/tests", "Rector\\Php80\\Tests\\": "rules/php80/tests", "Rector\\PhpSpecToPHPUnit\\Tests\\": "rules/php-spec-to-phpunit/tests", "Rector\\Privatization\\Tests\\": "rules/privatization/tests", "Rector\\RectorGenerator\\Tests\\": "packages/rector-generator/tests", "Rector\\RemovingStatic\\Tests\\": "rules/removing-static/tests", "Rector\\Renaming\\Tests\\": "rules/renaming/tests", "Rector\\Restoration\\Tests\\": "rules/restoration/tests", "Rector\\Sensio\\Tests\\": "rules/sensio/tests", "Rector\\CodeQualityStrict\\Tests\\": "rules/code-quality-strict/tests", "Rector\\SymfonyCodeQuality\\Tests\\": "rules/symfony-code-quality/tests", "Rector\\SymfonyPhpConfig\\Tests\\": "rules/symfony-php-config/tests", "Rector\\Symfony\\Tests\\": "rules/symfony/tests", "Rector\\Symfony2\\Tests\\": "rules/symfony2/tests", "Rector\\Symfony3\\Tests\\": "rules/symfony3/tests", "Rector\\Symfony4\\Tests\\": "rules/symfony4/tests", "Rector\\Symfony5\\Tests\\": "rules/symfony5/tests", "Rector\\Transform\\Tests\\": "rules/transform/tests", "Rector\\Twig\\Tests\\": "rules/twig/tests", "Rector\\TypeDeclaration\\Tests\\": "rules/type-declaration/tests", "Rector\\Utils\\DoctrineAnnotationParserSyncer\\": "utils/doctrine-annotation-parser-syncer/src", "Rector\\Utils\\NodeDocumentationGenerator\\": "utils/node-documentation-generator/src", "Rector\\Utils\\NodeDocumentationGenerator\\Tests\\": "utils/node-documentation-generator/tests", "Rector\\Utils\\PHPStanTypeMapperChecker\\": "utils/phpstan-type-mapper-checker/src", "Rector\\Utils\\ProjectValidator\\": "utils/project-validator/src", "Rector\\Carbon\\Tests\\": "rules/carbon/tests", "Rector\\Generics\\Tests\\": "rules/generics/tests" } }, "scripts": { "complete-check": [ "@check-cs", "@phpstan", "@docs", "phpunit" ], "check-cs": [ "vendor/bin/ecs check --ansi", "vendor/bin/ecs check-markdown README.md --ansi" ], "fix-cs": [ "vendor/bin/ecs check --fix --ansi", "vendor/bin/ecs check-markdown README.md --fix --ansi" ], "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify", "phpstan-config": "vendor/bin/phpstan analyse config --ansi --error-format symplify", "changelog": [ "vendor/bin/changelog-linker dump-merges --in-categories --ansi", "vendor/bin/changelog-linker link --ansi", "vendor/bin/changelog-linker cleanup --ansi" ], "docs": [ "vendor/bin/rule-doc-generator generate packages rules --output-file docs/rector_rules_overview.md --ansi --categorize", "bin/rector dump-nodes --output-file docs/nodes_overview.md --ansi", "vendor/bin/ecs check-markdown docs/rector_rules_overview.md docs/nodes_overview.md --ansi --fix" ], "rector-ci": "bin/rector process --dry-run --ansi", "rector": "bin/rector process --ansi" }, "config": { "sort-packages": true } }