Every year we’re getting new versions of PHP, which is great but it means we’re going to have to constantly put time into upgrading our code as features are added, deprecated, and removed from the core language. Thankfully we can look to the wonderful open-source tool [Rector](https://getrector.com/) to help us vastly speed up this process.

PHP has been slowly deprecating more and more functionality as we slowly work our way through the PHP 8.x lifecycle, and if we’re not careful, upgrading from PHP 8 to PHP 9 could be just as painful as upgrading from PHP 7 to PHP 8. Our process for upgrading a project from PHP 7.4 to PHP 8 took several developers multiple weeks because we had to manually fix thousands of lines of code by hand.

Finally, Rector provides rules that allow us to automatically clean up our code so it’s easier to read and maintain.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners