Workshop in English - US at PHP TEK 2025
Track Name:
Roave Stadium
Short URL: https://joind.in/talk/178c0
(QR-Code (opens in new window))
Are you working on a legacy project that is in need of upgrading?
Do you need to make changes to your project that require the same repetitive refactor applied to your codebase hundreds of times and no existing tools can to help automate the task?
If either of these scenarios are familiar you've probably had a look at or used Rector. Rector has hundreds of rules that help with automating upgrades and refactors.
However what happens if you need to do something custom to your project, that is not available with an existing Rector Rule? In this case you can create your own custom Rector rule.
This tutorial will teach you how to create custom Rector rules that can automate tasks specific to your project. By the end of this tutorial you'll know how to create your own rules and have a framework for creating rules for whatever refactor you wish to automate.
Comments
Please login to leave a comment
Learned a ton that I will definitely be using when I get back to work
Fantastic workshop Dave! The exercises were helpful and taught how to use Rector with baby steps. Well done!
Solid workshop. I really liked the structured examples in the provided github repo, and the answers branch was a great touch too.
I thoroughly enjoyed this tutorial. The way the examples were presented were extremely effective in teaching the information. Everything was easy to read, even from the back of the room and the branch structure for the repo will make it a valuable reference even after the conference is over. It was well paced, even if it’s usually meant to take longer.
Thank you Dave for facilitating this workshop! I attended with two other colleagues and we found it very useful to look at Rector collaboratively while learning some of the basics and pitfalls. Felt enabled to bring some approaches back to implement ourselves. Shoutout to Chris as well for helping out and giving a talk earlier in the day which would prepare folks well for this workshop.
Thanks for the tutorial. It gave me a good overview of how I can write my own rectors which I need to use to rewrite some of our legacy code into more current Laravel standards.