{ "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.10.4", "doctrine/inflector": "^1.4|^2.0", "jean85/pretty-package-versions": "^1.2", "migrify/php-config-printer": "^0.3.31", "nette/robot-loader": "^3.2", "nette/utils": "^3.1", "nikic/php-parser": "^4.9", "ondram/ci-detector": "^3.4", "phpstan/phpdoc-parser": "^0.4.9", "phpstan/phpstan": "^0.12.38", "phpstan/phpstan-phpunit": "^0.12.10", "psr/simple-cache": "^1.0", "sebastian/diff": "^3.0|^4.0", "symfony/cache": "^4.4.8|^5.0.6", "symfony/console": "^4.4.8|^5.0.6", "symfony/dependency-injection": "^4.4.8|^5.0.6", "symfony/finder": "^4.4.8|^5.0.6", "symfony/process": "^4.4.8|^5.0.6", "symplify/auto-bind-parameter": "^8.2.11", "symplify/autowire-array-parameter": "^8.2.11", "symplify/console-color-diff": "^8.2.11", "symplify/easy-testing": "^8.2.11", "symplify/package-builder": "^8.2.11", "symplify/set-config-resolver": "^8.2.11", "symplify/smart-file-system": "^8.2.11", "tracy/tracy": "^2.7" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", "johnkary/phpunit-speedtrap": "^3.2", "migrify/config-transformer": "^0.3.31", "migrify/easy-ci": "^0.3.31", "nette/application": "^3.0", "nette/forms": "^3.0", "ocramius/package-versions": "^1.4|^1.5", "phpunit/phpunit": "^8.5|^9.0", "psr/event-dispatcher": "^1.0", "slam/phpstan-extensions": "^5.0", "symplify/changelog-linker": "^8.2.11", "symplify/easy-coding-standard": "^8.2.11", "symplify/easy-testing": "^8.2.11", "symplify/monorepo-builder": "^8.2.11", "symplify/phpstan-extensions": "^8.2.11", "thecodingmachine/phpstan-strict-rules": "^0.12" }, "replace": { "rector/rector-prefixed": "self.version" }, "autoload": { "psr-4": { "Rector\\Architecture\\": "rules/architecture/src", "Rector\\AnonymousClass\\": "packages/anonymous-class/src", "Rector\\PostRector\\": "packages/post-rector/src", "Rector\\AttributeAwarePhpDoc\\": "packages/attribute-aware-php-doc/src", "Rector\\Autodiscovery\\": "rules/autodiscovery/src", "Rector\\BetterPhpDocParser\\": "packages/better-php-doc-parser/src", "Rector\\CakePHP\\": "rules/cakephp/src", "Rector\\ChangesReporting\\": "packages/changes-reporting/src", "Rector\\CodeQuality\\": "rules/code-quality/src", "Rector\\NodeRemoval\\": "packages/node-removal/src", "Rector\\Generic\\": "rules/generic/src", "Rector\\Reporting\\": "packages/reporting/src", "Rector\\CodingStyle\\": "rules/coding-style/src", "Rector\\ConsoleDiffer\\": "packages/console-differ/src", "Rector\\Core\\": "src", "Rector\\DeadCode\\": "rules/dead-code/src", "Rector\\DocumentationGenerator\\": "packages/documentation-generator/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\\DoctrineAnnotationGenerated\\": "packages/doctrine-annotation-generated/src", "Rector\\FileSystemRector\\": "packages/file-system-rector/src", "Rector\\FrameworkMigration\\": "rules/framework-migration/src", "Rector\\FamilyTree\\": "packages/family-tree/src", "Rector\\Guzzle\\": "rules/guzzle/src", "Rector\\JMS\\": "rules/jms/src", "Rector\\Laravel\\": "rules/laravel/src", "Rector\\Legacy\\": "rules/legacy/src", "Rector\\MagicDisclosure\\": "rules/magic-disclosure/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\\Decouple\\": "rules/decouple/src", "Rector\\NodeNameResolver\\": "packages/node-name-resolver/src", "Rector\\NodeTypeResolver\\": "packages/node-type-resolver/src", "Rector\\PhpAttribute\\": "packages/php-attribute/src", "Rector\\PHPStanStaticTypeMapper\\": "packages/phpstan-static-type-mapper/src", "Rector\\PHPStan\\": "rules/phpstan/src", "Rector\\PHPUnitSymfony\\": "rules/phpunit-symfony/src", "Rector\\Caching\\": "packages/caching/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\\Php\\": "rules/php/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\\PHPOffice\\": "rules/php-office/src", "Rector\\PhpDeglobalize\\": "rules/php-deglobalize/src", "Rector\\PhpSpecToPHPUnit\\": "rules/php-spec-to-phpunit/src", "Rector\\Polyfill\\": "rules/polyfill/src", "Rector\\Privatization\\": "rules/privatization/src", "Rector\\RectorGenerator\\": "packages/rector-generator/src", "Rector\\Set\\": "packages/set/src", "Rector\\RemovingStatic\\": "rules/removing-static/src", "Rector\\Renaming\\": "rules/renaming/src", "Rector\\Restoration\\": "rules/restoration/src", "Rector\\SOLID\\": "rules/solid/src", "Rector\\NodeNestingScope\\": "packages/node-nesting-scope/src", "Rector\\Sensio\\": "rules/sensio/src", "Rector\\StaticTypeMapper\\": "packages/static-type-mapper/src", "Rector\\StrictCodeQuality\\": "rules/strict-code-quality/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\\Performance\\": "rules/performance/src", "Rector\\Naming\\": "rules/naming/src", "Rector\\Order\\": "rules/order/src", "Rector\\MockeryToProphecy\\": "rules/mockery-to-prophecy/src", "Rector\\MockistaToMockery\\": "rules/mockista-to-mockery/src", "Rector\\NetteKdyby\\": "rules/nette-kdyby/src", "Rector\\NetteUtilsCodeQuality\\": "rules/nette-utils-code-quality/src", "Rector\\NetteCodeQuality\\": "rules/nette-code-quality/src", "Rector\\Decomplex\\": "rules/decomplex/src", "Rector\\Downgrade\\": "rules/downgrade/src", "Rector\\SymfonyPhpConfig\\": "rules/symfony-php-config/src", "Rector\\Injection\\": "rules/injection/src" }, "files": [ "rules/symfony-php-config/functions/functions.php" ] }, "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\\CakePHP\\Tests\\": "rules/cakephp/tests", "Rector\\CodeQuality\\Tests\\": "rules/code-quality/tests", "Rector\\Caching\\Tests\\": "packages/caching/tests", "Rector\\CodingStyle\\Tests\\": "rules/coding-style/tests", "Rector\\Core\\Tests\\": "tests", "Rector\\Decouple\\Tests\\": "rules/decouple/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\\Guzzle\\Tests\\": "rules/guzzle/tests", "Rector\\Generic\\Tests\\": "rules/generic/tests", "Rector\\JMS\\Tests\\": "rules/jms/tests", "Rector\\Laravel\\Tests\\": "rules/laravel/tests", "Rector\\Legacy\\Tests\\": "rules/legacy/tests", "Rector\\RectorGenerator\\Tests\\": "packages/rector-generator/tests", "Rector\\MagicDisclosure\\Tests\\": "rules/magic-disclosure/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\\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\\PHPOffice\\Tests\\": "rules/php-office/tests", "Rector\\PhpDeglobalize\\Tests\\": "rules/php-deglobalize/tests", "Rector\\PhpSpecToPHPUnit\\Tests\\": "rules/php-spec-to-phpunit/tests", "Rector\\Polyfill\\Tests\\": "rules/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\\StrictCodeQuality\\Tests\\": "rules/strict-code-quality/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\\DoctrineAnnotationParserSyncer\\": "utils/doctrine-annotation-parser-syncer/src", "Rector\\Utils\\PHPStanAttributeTypeSyncer\\": "utils/phpstan-attribute-type-syncer/src", "Rector\\Utils\\PHPStanStaticTypeMapperChecker\\": "utils/phpstan-static-type-mapper-checker/src", "Rector\\Performance\\Tests\\": "rules/performance/tests", "Rector\\Naming\\Tests\\": "rules/naming/tests", "Rector\\Order\\Tests\\": "rules/order/tests", "Rector\\MockeryToProphecy\\Tests\\": "rules/mockery-to-prophecy/tests", "Rector\\MockistaToMockery\\Tests\\": "rules/mockista-to-mockery/tests", "Rector\\Compiler\\Tests\\": "compiler/tests", "Rector\\NetteKdyby\\Tests\\": "rules/nette-kdyby/tests", "Rector\\NetteUtilsCodeQuality\\Tests\\": "rules/nette-utils-code-quality/tests", "Rector\\NetteCodeQuality\\Tests\\": "rules/nette-code-quality/tests", "Rector\\Decomplex\\Tests\\": "rules/decomplex/tests", "Rector\\Downgrade\\Tests\\": "rules/downgrade/tests", "Rector\\SymfonyPhpConfig\\Tests\\": "rules/symfony-php-config/tests", "Rector\\Injection\\Tests\\": "rules/injection/tests" }, "classmap": [ "rules/cakephp/tests/Rector/Name/ImplicitShortClassNameUseStatementRector/Source", "rules/symfony/tests/Rector/MethodCall/ContainerGetToConstructorInjectionRector/Source", "rules/autodiscovery/tests/Rector/FileSystem/MoveInterfacesToContractNamespaceDirectoryRector/Expected", "rules/autodiscovery/tests/Rector/FileSystem/MoveServicesBySuffixToDirectoryRector/Expected", "rules/cakephp/tests/Rector/Expression/AppUsesStaticCallToUseStatementRector/Source", "tests/Source", "rules/psr4/tests/Rector/MultipleClassFileToPsr4ClassesRector/Source", "rules/generic/tests/Rector/Name/PseudoNamespaceToNamespaceRector/Source" ], "files": [ "rules/generic/tests/Rector/FuncCall/FuncCallToMethodCallRector/Source/some_view_function.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/Name/RenameClassRector/Source/SomeInterface.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/ClassImportingSameName.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/Twig_Extension_Sandbox.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/TwigFilter.php", "rules/renaming/tests/Rector/Name/RenameClassRector/Source/Manual_Twig_Filter.php", "rules/generic/tests/Rector/Name/PseudoNamespaceToNamespaceRector/Source/ChangeMeAnotherNamespace.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/AnotherClass.php", "rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/YetAnotherClass.php", "rules/solid/tests/Rector/ClassMethod/UseInterfaceOverImplementationInConstructorRector/Source/Coconut.php", "stubs/Nette/Localization/ITranslation.php" ] }, "scripts": { "complete-check": [ "@check-cs", "@phpstan", "@docs", "phpunit" ], "check-cs": "vendor/bin/ecs check --ansi", "fix-cs": "vendor/bin/ecs check --fix --ansi", "phpstan": [ "vendor/bin/phpstan analyse --ansi --error-format symplify", "vendor/bin/phpstan analyse config/set --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": [ "bin/rector dump-rectors > docs/rector_rules_overview.md", "bin/rector dump-nodes > docs/nodes_overview.md" ], "rector-ci": "bin/rector process --config rector-ci.php --dry-run --ansi", "rector": "bin/rector process --config rector-ci.php --ansi" }, "config": { "sort-packages": true }, "extra": { "branch-alias": { "dev-master": "0.8-dev" } } }