Let Rector
do the
Boring Work
Tomas Votruba
@votrubaT



Hi, I'm Tomas...
...and I love legacy code 😍


1. How does a
Symfony guy...
get to a Laracon?




"The best teachers are those
who show you where to look,
but don't tell you what to see."


@PatricioOnCode










Laravel community is next level ❤️️
2. How do you handle upgrades?
"Upgrading software is like basic hygiene.
Do it daily for 10 minutes and you'll live long and healthy life.
Skip it for year or two and you'll find yourself in hospital (in better case)."
Subtitle












My first Laravel upgrade
-
Laravel 5.8 → 6
-
2019
-
Facade aliases to FQN



Two ways
to upgrade

composer.json → "php" : "^7.0"

(private Property $promotion)
strict_types=1
param type declarations
arrow => functions
native ENUMs
#[Attributes]
namedArguments: true


composer.json → "php" : "^7.0" → "^7.4"
4. From boring tasks, to Rector
Rector Goals
- free
- scaling
- for everyone 😊
- Laravel, Symfony
- Drupal, WP
- Zend, Laminas
- ...
- community based
"If everyone here would create
a single upgrade rule today,
we would cover whole PHP and Laravel changes
from its first version to the latest version"
5. The boring work
demo
The link to the demo repository will be on the last slide 😉
to save you from photos 🤳
6. Do it once,
build together,
use forever





Thank you 🙏
Enjoy the rest of the day
Have fun, meet friends, build together 🤗
deck
By Tomáš Votruba
deck
- 316