About the Book
Rector is an extremely powerful tool that can instantly improve the code quality of your PHP projects. It can be used to safely migrate projects from PHP 5.6 to PHP 8. It can help you establish a standard of robust programming practices in your project. And it can save you a lot of time spent on reviewing pull requests.
In this book, seasoned developers Matthias Noback and Tomas Votruba give you all the information you need to become a Rector power user. You'll learn:
- How to make Rector part of your daily development workflow
- How to create Rector rules that replace repetitive manual refactoring work
- How to automate even more with Rector by adding it to your project's build process
Tomas, being the founding father and core maintainer of the Rector project, will shine his light on:
- What's the place of Rector in the larger ecosystem of PHP tools for code quality assurance?
- What role will Rector fulfill in the future?
Matthias, who has a strong focus on automated testing, will cover:
- The concepts behind Rector: tokenizing, parsing, and manipulating PHP AST nodes
- Test-driven development techniques for creating automated refactorings
What readers say
"I've been following Rector for a couple of years now. I've been very excited by the claims and demos but try as I might to get an understanding and a usable knowledge I just couldn't... until the book. Now within the space of a few days I have started to integrate Rector into a 20-year-old project (with a couple million lines of code) at work. My commits have increased, I have been able to find way more problems early on in code reviews, and I have started to clean up a lot of legacy spaghetti code.
Many thanks for the book, it has really really.... REALLY helped!"
-- Steve Hyde
"Grabbed my copy. This was an absolute nobrainer.
(one day later)
I already read through the whole thing. Nice work. Next step is to create some rules"
"The book is easy to read in a complex subject to me. Congrats both on your excellent work!!"
About the Authors
Tomas loves to combine open-source and innovations... yet he's super lazy. Traumatized in childhood by doing repeated tasks as a punishment by his father (whom he loves), he's unable to do anything twice without deep physical pain. That's why he always spends dozens of hours to automate problems that would take and hour or two to do manually.
This extreme lazyness created the Rector ecosystem. A tool that automatically upgrades and refactores PHP, so you can have a coffee instead while your code is upgraded from PHP 5.3 to PHP 8.1.