(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

Rector instantly upgrades PHP & YAML code of your application, with focus on open-source projects: PHP, CakePHP, Symfony, Sylius, PHPUnit, Twig, SilverStripe.

Rector can:

  • Rename classes, methods and properties
  • Rename partial namespace
  • Rename pseudo-namespace to namespace
  • Add, replace or remove arguments
  • Add arguments or return typehint
  • Change visibility of constant, property or method
  • And much more…


Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer installed.

Require it as a dev dependency:
composer require --dev rector/rector
Run it:
php vendor/bin/rector