Refactoring Huge Legacy PHP Applications - From 100 hours to minutes
summary
Claims automated refactoring cuts huge PHP upgrades from weeks to minutes by writing reusable rules and running them across the codebase. Uses Rector built on PHP-Parser with PHPStan for types, applies a rule to 1000 classes in seconds. Demonstrated migrating a 54k‑line MVC app with 150 routes — first run took ~80 hours to craft rules, subsequent runs are minutes; handles countable checks, eval->AST transforms, Twig namespacing and PHPUnit upgrades, and preserves tests.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:15Education
- 3:10Undocumented BCs
- 6:45Code becomes legacy
- 12:00Technical details
- 13:28Help
- 16:55Code Quality
- 18:45Code Cleanup
- 23:21Troubleshooting
related talks
57mRefactoring a large legacy PHP Application: a case study
14mInstant Upgrades with Rector
46mRewriting 15-Year-Old Code
01h 02mRewriting 12-Year-Old Code
28mReformat, Refactor, Replace: A practical guide for dealing with legacy software
41mTesting Legacy Code & Safe Refactoring
47mMigrating to PHP 7
22mInstant Upgrades with Rector
