My star on github, was as first used as a bookmark, but some days later, the team from Rector contacted me, and this change a lot regarding my view on refactoring, complexity and automation tools for development.
Rector@rectorphpWe made it 🌟🌟🌟, thank you! ❤️️
As we promised, we'll pick one of you and help him or her migrate their code.
or @tomasnorre ?
Reach us with your PHP code migration needs: getrector.org/contact
We'll pick one and make it happen 💪 twitter.com/rectorphp/stat…08:46 AM - 19 Nov 2019Rector @rectorphpWohooo, after 2 years we're at almost 2 000 🌟 on Github! https://t.co/sE4B7J7Lc7 To celebrate, we'll pick one of you from last 10 people who help us get there. We'll make custom migration for your needs ❤️
I contacted the rector team as instructed in the tweet, and Tomas Votruba got back to me, and we discussed how he could help me.
Tomas implemented following in our CI pipeline:
- [CI] Add Rector CI
- [Travis] Cleanup and split jobs clearly
- [TASK] Apply static + PSR-12 set
- Apply PHP 7.1 and PHP 7.2 features
All this done within a week, and the code base was already improve a lot.
The win wasn't "only" the 4 commits from Tomas, that helped me one time. He help me setup some basics that will help me a lot in the future.
Now we have Rector CI, Code Standard and PHPStan checks as part of our Travis CI Pipeline and this is done for every single commit and pull request, so the quality of the code commit since then will also be improved, cleaner and easier to maintain in the future.
Next time I want to deprecate a PHP Version e.g. PHP 7.2 and PHP 7.3, I can add PHP Sets to the
ecs.yaml and the run the command
.Build/bin/ecs check Classes Configuration Tests --fix and then most, if not all of the changes are done automatically within a few seconds.
I don't see how my work as PHP Developer will continue without using a tool like rector, it makes a lot of things way easier.
The rector is in general a tool that can help a lot with PHP and framework updates like symfony, but as I'm more a TYPO3 kind of person, I've joined an initiative to make migration sets for TYPO3 Core Updates as well.
This will ease the upgrade from e.g. TYPO3 9 LTS to TYPO3 10 (Soon to be LTS), but this is something I'll share more about later.