Legacy Revived: Migrating a Frameworkless PHP App to Laravel
My WebExpo 2024 talk: rewriting a 15-year-old frameworkless PHP site as a Laravel and Vue.js app, what changed in the stack, and why we shipped it all at once.
Last year I went to WebExpo Prague to see the conference in person and I really enjoyed it. One of the first things that went through my mind was: I want to speak on that stage as well.
This year I'm selected as one of the speakers of the conference with my talk: Legacy revived - Migrating a frameworkless PHP app to Laravel with Vue.js frontend.
This is going to be my first time speaking on an international stage, but at least it's not going to be the first time I'm presenting in English, so fingers crossed that I won't freeze on stage.
Update: the talk is done and the recording is online. You can watch it on SlidesLive.
The talk
| Event | WebExpo 2024, Prague |
| Date | 30 May 2024, 10:00 |
| Venue | Lucerna Cinema |
| Length | 40 minutes |
| Track focus | Backend development |
The talk is the story of one migration from start to release: the decisions we made during the process, what worked and what didn't, the challenges we ran into along the way, and what we would do differently in hindsight. It is about moving a live product off a legacy codebase, not a Laravel tutorial.
The project behind it
The talk is based on OddsPortal.com, one of the products my team and I have been working on for the last couple of years. Our parent company, Livesport, asked us to help redesign and maintain it.
The codebase was about 15 years old. PHP, HTML and JavaScript were mixed in the same files, there was a little OOP here and there, and no framework at all.
The journey started as a plan to just redesign the website. Before starting, my team and I planned the work and decided a clean rewrite was the right approach. It took about a year and a half, and the site now runs on Laravel, Vue.js and Tailwind CSS, all on current versions.
What changed
Here is a summary of what we changed during the process:
| Before | After |
|---|---|
| PHP 7.3 | PHP 8.1 |
| No framework | Laravel |
| Outdated Composer libraries | Up-to-date libraries |
| No responsive version | Fully responsive website |
| Old vanilla JS libraries | Modern replacements |
| jQuery | Vue.js |
| - | Storybook |
| - | Vue.js component tests |
| - | Cypress tests |
| - | Tailwind CSS |
Why we released everything at once
Since the main idea was to make a redesign of the website there was no way of doing things gracefully and one by one. A visitor can't get half of the old design and half of the new one, so the new site had to replace the old one as a whole. We had to release the whole thing at once, which of course is not the best solution for something that big.
We went through a few stages before completely replacing the old website with the new one. The talk goes through those stages and the release in more detail, so I'll leave that part for the recording.
The work isn't finished. There is still work to be done and lessons to be learned about some things.
Watch the talk
The full 40-minute recording is on SlidesLive, and the session page with the abstract is on the WebExpo website. You can find my other talks and podcasts on the Speaking page.
If you are planning a similar migration and want to compare notes, get in touch.