How can We
With Single CLI Command?
Rector is a CLI tool written in PHP. It can instantly upgrade old PHP code and handle automated refactorings. It's fast and precise - changes 5000 files under minute.
The code is open-sourced on GitHub.
First Run
Add Rector to your project to save hours of manual boring work:
composer require rector/rector --dev
vendor/bin/rector init
vendor/bin/rector --dry-run
Our Mission: Remove "Legacy" from Vocabulary
Learn Rector in Depth from a Book
In May 2021 we've released a book:
Rector - The Power of Automated Refactoring
What's inside the book?
- How Rector works internally?
- How to create your own rules and how test them?
- Why Rector was born?
- How will next 5 years of PHP shape differently?
By buying the book you directly support Rector maintainers.
Learn Cool Tips from Blog
How will Rector make your Life Easier?
Smarter Code
Cheaper Features
Faster Onboarding
Happier
Developers
Continuous Upgrades
Automated Code Reviews
What do people Love about Rector?
![]()
"Since last week, I automated several months of mindless work.
Rector is one of my best friends in the fight against legacy."
![]()
"Just upgraded PHPUnit 4 to 8 with Rector in 3 seconds."
![]()
"Rector is one of the most useful projects PHP developers overlook.
It upgrades your Symfony 3 app to Symfony 4."