{ "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.2.4", "ext-json": "*", "composer/xdebug-handler": "^1.4", "doctrine/annotations": "^1.8", "doctrine/inflector": "^1.3", "jean85/pretty-package-versions": "^1.2", "jetbrains/phpstorm-stubs": "^2019.3", "nette/robot-loader": "^3.2", "nette/utils": "^3.1", "nikic/php-parser": "^4.3", "ondram/ci-detector": "^3.1", "phpstan/phpdoc-parser": "^0.4", "phpstan/phpstan": "^0.12.11", "phpstan/phpstan-phpunit": "^0.12", "sebastian/diff": "^3.0|^4.0", "symfony/console": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/finder": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", "symplify/auto-bind-parameter": "^7.2.4", "symplify/autowire-array-parameter": "^7.2.4", "symplify/package-builder": "^7.2.4", "symplify/set-config-resolver": "^7.2.4", "tracy/tracy": "^2.7" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", "ocramius/package-versions": "^1.4|^1.5", "phpunit/phpunit": "^8.4|^9.0", "symplify/changelog-linker": "^7.2.4", "symplify/easy-coding-standard": "^7.2.4", "symplify/monorepo-builder": "^7.2.4", "symplify/phpstan-extensions": "^7.2.4", "thecodingmachine/phpstan-strict-rules": "^0.12" }, "replace": { "rector/rector-prefixed": "self.version" }, "autoload": { "psr-4": { "Rector\\Architecture\\": "rules/architecture/src", "Rector\\AttributeAwarePhpDoc\\": "packages/attribute-aware-php-doc/src", "Rector\\Autodiscovery\\": "rules/autodiscovery/src", "Rector\\BetterPhpDocParser\\": "packages/better-php-doc-parser/src", "Rector\\CakePHPToSymfony\\": "rules/cakephp-to-symfony/src", "Rector\\CakePHP\\": "rules/cakephp/src", "Rector\\Celebrity\\": "rules/celebrity/src", "Rector\\ChangesReporting\\": "packages/changes-reporting/src", "Rector\\CodeQuality\\": "rules/code-quality/src", "Rector\\CodingStyle\\": "rules/coding-style/src", "Rector\\ConsoleDiffer\\": "packages/console-differ/src", "Rector\\Core\\": "src", "Rector\\DeadCode\\": "rules/dead-code/src", "Rector\\DoctrineCodeQuality\\": "rules/doctrine-code-quality/src", "Rector\\DoctrineGedmoToKnplabs\\": "rules/doctrine-gedmo-to-knplabs/src", "Rector\\Doctrine\\": "rules/doctrine/src", "Rector\\DynamicTypeAnalysis\\": "packages/dynamic-type-analysis/src", "Rector\\ElasticSearchDSL\\": "rules/elastic-search-dsl/src", "Rector\\FileSystemRector\\": "packages/file-system-rector/src", "Rector\\FrameworkMigration\\": "rules/framework-migration/src", "Rector\\Guzzle\\": "rules/guzzle/src", "Rector\\JMS\\": "rules/jms/src", "Rector\\Laravel\\": "rules/laravel/src", "Rector\\Legacy\\": "rules/legacy/src", "Rector\\MinimalScope\\": "rules/minimal-scope/src", "Rector\\MysqlToMysqli\\": "rules/mysql-to-mysqli/src", "Rector\\NetteTesterToPHPUnit\\": "rules/nette-tester-to-phpunit/src", "Rector\\NetteToSymfony\\": "rules/nette-to-symfony/src", "Rector\\Nette\\": "rules/nette/src", "Rector\\NodeCollector\\": "packages/node-collector/src", "Rector\\NodeNameResolver\\": "packages/node-name-resolver/src", "Rector\\NodeTypeResolver\\": "packages/node-type-resolver/src", "Rector\\Oxid\\": "rules/oxid/src", "Rector\\PHPStanStaticTypeMapper\\": "packages/phpstan-static-type-mapper/src", "Rector\\PHPStan\\": "rules/phpstan/src", "Rector\\PHPUnitSymfony\\": "rules/phpunit-symfony/src", "Rector\\PHPUnit\\": "rules/phpunit/src", "Rector\\PSR4\\": "rules/psr4/src", "Rector\\Phalcon\\": "rules/phalcon/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\\PhpDeglobalize\\": "rules/php-deglobalize/src", "Rector\\PhpSpecToPHPUnit\\": "rules/php-spec-to-phpunit/src", "Rector\\Polyfill\\": "packages/polyfill/src", "Rector\\Privatization\\": "rules/privatization/src", "Rector\\RectorGenerator\\": "packages/rector-generator/src", "Rector\\Refactoring\\": "packages/refactoring/src", "Rector\\RemovingStatic\\": "rules/removing-static/src", "Rector\\Renaming\\": "rules/renaming/src", "Rector\\Restoration\\": "rules/restoration/src", "Rector\\SOLID\\": "rules/solid/src", "Rector\\Sensio\\": "rules/sensio/src", "Rector\\Shopware\\": "rules/shopware/src", "Rector\\Silverstripe\\": "rules/silverstripe/src", "Rector\\StaticTypeMapper\\": "packages/static-type-mapper/src", "Rector\\StrictCodeQuality\\": "rules/strict-code-quality/src", "Rector\\Sylius\\": "rules/sylius/src", "Rector\\SymfonyCodeQuality\\": "rules/symfony-code-quality/src", "Rector\\SymfonyPHPUnit\\": "rules/symfony-phpunit/src", "Rector\\Symfony\\": "rules/symfony/src", "Rector\\Twig\\": "rules/twig/src", "Rector\\TypeDeclaration\\": "rules/type-declaration/src", "Rector\\VendorLocker\\": "packages/vendor-locker/src", "Rector\\ZendToSymfony\\": "rules/zend-to-symfony/src" } }, "autoload-dev": { "psr-4": { "Rector\\Architecture\\Tests\\": "rules/architecture/tests", "Rector\\Autodiscovery\\Tests\\": "rules/autodiscovery/tests", "Rector\\BetterPhpDocParser\\Tests\\": "packages/better-php-doc-parser/tests", "Rector\\CakePHPToSymfony\\Tests\\": "rules/cakephp-to-symfony/tests", "Rector\\CakePHP\\Tests\\": "rules/cakephp/tests", "Rector\\Celebrity\\Tests\\": "rules/celebrity/tests", "Rector\\CodeQuality\\Tests\\": "rules/code-quality/tests", "Rector\\CodingStyle\\Tests\\": "rules/coding-style/tests", "Rector\\Core\\Tests\\": "tests", "Rector\\DeadCode\\Tests\\": "rules/dead-code/tests", "Rector\\DoctrineCodeQuality\\Tests\\": "rules/doctrine-code-quality/tests", "Rector\\DoctrineGedmoToKnplabs\\Tests\\": "rules/doctrine-gedmo-to-knplabs/tests", "Rector\\Doctrine\\Tests\\": "rules/doctrine/tests", "Rector\\DynamicTypeAnalysis\\Tests\\": "packages/dynamic-type-analysis/tests", "Rector\\ElasticSearchDSL\\Tests\\": "rules/elastic-search-dsl/tests", "Rector\\Guzzle\\Tests\\": "rules/guzzle/tests", "Rector\\JMS\\Tests\\": "rules/jms/tests", "Rector\\Laravel\\Tests\\": "rules/laravel/tests", "Rector\\Legacy\\Tests\\": "rules/legacy/tests", "Rector\\MinimalScope\\Tests\\": "rules/minimal-scope/tests", "Rector\\MysqlToMysqli\\Tests\\": "rules/mysql-to-mysqli/tests", "Rector\\NetteTesterToPHPUnit\\Tests\\": "rules/nette-tester-to-phpunit/tests", "Rector\\NetteToSymfony\\Tests\\": "rules/nette-to-symfony/tests", "Rector\\Nette\\Tests\\": "rules/nette/tests", "Rector\\NodeTypeResolver\\Tests\\": "packages/node-type-resolver/tests", "Rector\\Oxid\\Tests\\": "rules/oxid/tests", "Rector\\PHPStanExtensions\\": "utils/phpstan-extensions/src", "Rector\\PHPStanExtensions\\Tests\\": "utils/phpstan-extensions/tests", "Rector\\PHPStan\\Tests\\": "rules/phpstan/tests", "Rector\\PHPUnitSymfony\\Tests\\": "rules/phpunit-symfony/tests", "Rector\\PHPUnit\\Tests\\": "rules/phpunit/tests", "Rector\\PSR4\\Tests\\": "rules/psr4/tests", "Rector\\Phalcon\\Tests\\": "rules/phalcon/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\\PhpDeglobalize\\Tests\\": "rules/php-deglobalize/tests", "Rector\\PhpSpecToPHPUnit\\Tests\\": "rules/php-spec-to-phpunit/tests", "Rector\\Polyfill\\Tests\\": "packages/polyfill/tests", "Rector\\Privatization\\Tests\\": "rules/privatization/tests", "Rector\\RemovingStatic\\Tests\\": "rules/removing-static/tests", "Rector\\Renaming\\Tests\\": "rules/renaming/tests", "Rector\\Restoration\\Tests\\": "rules/restoration/tests", "Rector\\SOLID\\Tests\\": "rules/solid/tests", "Rector\\Sensio\\Tests\\": "rules/sensio/tests", "Rector\\Shopware\\Tests\\": "rules/shopware/tests", "Rector\\Silverstripe\\Tests\\": "rules/silverstripe/tests", "Rector\\StrictCodeQuality\\Tests\\": "rules/strict-code-quality/tests", "Rector\\Sylius\\Tests\\": "rules/sylius/tests", "Rector\\SymfonyCodeQuality\\Tests\\": "rules/symfony-code-quality/tests", "Rector\\SymfonyPHPUnit\\Tests\\": "rules/symfony-phpunit/tests", "Rector\\Symfony\\Tests\\": "rules/symfony/tests", "Rector\\Twig\\Tests\\": "rules/twig/tests", "Rector\\TypeDeclaration\\Tests\\": "rules/type-declaration/tests", "Rector\\Utils\\DocumentationGenerator\\": "utils/documentation-generator/src", "Rector\\Utils\\ProjectValidator\\": "utils/project-validator/src", "Rector\\Utils\\PHPStanAttributeTypeSyncer\\": "utils/phpstan-attribute-type-syncer/src", "Rector\\Utils\\PHPStanStaticTypeMapperChecker\\": "utils/phpstan-static-type-mapper-checker/src", "Rector\\ZendToSymfony\\Tests\\": "rules/zend-to-symfony/tests" }, "classmap": [ "tests/Source", "tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/Source", "tests/Rector/Namespace_/PseudoNamespaceToNamespaceRector/Source", "tests/Issues/Issue1243/Source", "rules/cakephp/tests/Rector/Name/ImplicitShortClassNameUseStatementRector/Source", "rules/symfony/tests/Rector/FrameworkBundle/AbstractToConstructorInjectionRectorSource", "rules/symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/Source", "packages/node-type-resolver/tests/PerNodeTypeResolver/ParamTypeResolver/Source", "packages/node-type-resolver/tests/PerNodeTypeResolver/PropertyTypeResolver/Source", "rules/autodiscovery/tests/Rector/FileSystem/MoveInterfacesToContractNamespaceDirectoryRector/Expected", "rules/autodiscovery/tests/Rector/FileSystem/MoveServicesBySuffixToDirectoryRector/Expected", "rules/cakephp/tests/Rector/StaticCall/AppUsesStaticCallToUseStatementRector/Source", "rules/cakephp-to-symfony/tests/Rector/Class_/CakePHPControllerComponentToSymfonyRector/Source", "rules/cakephp-to-symfony/tests/Rector/Class_/CakePHPModelToDoctrineEntityRector/Source" ], "files": [ "packages/better-php-doc-parser/tests/PhpDocInfo/PhpDocInfoPrinter/AbstractPhpDocInfoPrinterTest.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/type-declaration/tests/Rector/Property/CompleteVarDocTypePropertyRector/Source/EventDispatcher.php", "rules/type-declaration/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Source/MyBar.php", "rules/renaming/tests/Rector/Class_/RenameClassRector/Source/SomeInterface.php", "rules/renaming/tests/Rector/Class_/RenameClassRector/Source/ClassImportingSameName.php", "rules/renaming/tests/Rector/Class_/RenameClassRector/Source/Twig_Extension_Sandbox.php", "rules/renaming/tests/Rector/Class_/RenameClassRector/Source/TwigFilter.php", "rules/renaming/tests/Rector/Class_/RenameClassRector/Source/Manual_Twig_Filter.php", "rules/solid/tests/Rector/ClassMethod/UseInterfaceOverImplementationInConstructorRector/Source/Apple.php", "tests/Rector/Namespace_/PseudoNamespaceToNamespaceRector/Source/ChangeMeAnotherNamespace.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/Foo.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/safe_count.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/AnotherClass.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/YetAnotherClass.php" ] }, "scripts": { "complete-check": [ "@check-cs", "@check-fixtures", "@check-services", "phpunit", "@phpstan", "@docs", "bin/rector sync-types", "bin/rector check-static-type-mappers", "@check-sets" ], "check-sets": "bin/rector validate-sets --ansi", "check-cs": "vendor/bin/ecs check --ansi", "check-fixtures": "bin/rector validate-fixture --ansi", "check-services": "bin/rector validate-services-in-sets --ansi", "fix-cs": [ "vendor/bin/ecs check --fix --ansi", "ci/clean_trailing_spaces.sh" ], "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify", "changelog": [ "vendor/bin/changelog-linker dump-merges --in-categories", "vendor/bin/changelog-linker link", "vendor/bin/changelog-linker cleanup" ], "check-docs": [ "bin/rector dump-rectors -o markdown | diff --ignore-space-change docs/AllRectorsOverview.md - ", "bin/rector dump-nodes -o markdown | diff --ignore-space-change docs/NodesOverview.md - " ], "docs": [ "bin/rector dump-rectors -o markdown > docs/AllRectorsOverview.md", "bin/rector dump-nodes -o markdown > docs/NodesOverview.md" ], "rector-ci-fix": "bin/rector process --config rector-ci.yaml --ansi --no-progress-bar", "rector-ci": "bin/rector process --config rector-ci.yaml --ansi --no-progress-bar --dry-run", "rector": "bin/rector process --config rector-ci.yaml --ansi" }, "config": { "sort-packages": true }, "extra": { "branch-alias": { "dev-master": "0.8-dev" } } }