Menu

Strangler Fig for Legacy PHP: Run Old and New Side by Side
📰

Strangler Fig for Legacy PHP: Run Old and New Side by Side

DEV Community: laravel·Muhammad Ali Mughal·about 17 hours ago
#Vhay9N8o
#devtolaravel#devto#dev#legacy#route
Reading 0:00
15s threshold

A distribution company asked us to "rewrite the portal" in 2023. It was a PHP 5.6 application from 2012: 400 files, no framework, SQL in the templates, and a cron folder nobody dared to open. It ran their ordering, invoicing and dealer accounts, and it made money every day. A previous agency had tried a full rewrite. After eleven months they had a beautiful new app that covered about 60% of the features, while the old one kept changing underneath them. The project was cancelled. We took a different route: we put a router in front of the old app and moved one page at a time to a new Laravel application. The first route went live in week three. Fourteen months later the old app served nothing, and we turned it off on a Tuesday afternoon without a maintenance window.

I wrote this with help from AI tools and checked the configuration against the Nginx and Laravel documentation and Martin Fowler's original description of the strangler fig pattern.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.