Rewriting 12-Year-Old Code
summary
Progressive rewrites replace fragile PHP3/PHP5.3 spaghetti one page or module at a time, using mod_rewrite routing to send legacy URLs to Symfony controllers, an AngularJS front end calling a new REST API on PHP5.6, and a shared DB session adapter so old and new apps coexist. Tests use Guzzle HTTP comparisons to verify identical output, and a schema-diff SQL patch (Python) fixes Magento upgrade mismatches. Result: incremental cutover, runnable migrations, and legacy removal without a big-bang rewrite.
AI-written summary · about
chapters (19)
- 0:00Rewriting 12-Year-Old Code
- 0:21Anna Filina
- 4:29Objectives
- 6:59Giving you a false sense of security
- 9:38OOP, but with global & static functions
- 10:15What happened at order 20117?
- 11:35It can take too long
- 17:12Data can be lost, stuff can break
- 27:25Magento 1.5 to 1.9
- 32:29PHP3 to PHP5.6
- 36:41Solution
- 38:54Avoid code bias
- 41:45ASP Classic to PHP5.6
- 44:38Guzzle tests
- 50:09Splitting the app
- 52:29Alias is your friend
- 54:32Ask refactoring experts
- 55:22Practice creative thinking
- 56:54Takeaways
related talks
46mRewriting 15-Year-Old Code
01h 06mRewriting Legacy Code
57mEating spaghetti with Symfony
40mRefactoring Huge Legacy PHP Applications - From 100 hours to minutes
57mRefactoring a large legacy PHP Application: a case study
49mUpgrading Legacy to the Latest PHP Version
34mWhy PHP and Symfony are still in the game
14mInstant Upgrades with Rector
