rectorphp/rector
Rector rewrites PHP source automatically, either to upgrade a project between PHP versions from 5.3 to 8.5 or to apply refactoring rules that improve code quality. Rules run singly or as prepared sets, and framework-specific sets are maintained for Symfony, PHPUnit, Doctrine, TYPO3 and others. A configuration file in the project root selects the rules, and a dry run shows the resulting diff before anything is written.
Maintenance activity