Daniel Kisantal Legacy PHP modernization

Migrating legacy PHP frameworks to Symfony or Laravel

CodeIgniter 2 and 3, Symfony 2 to 4, early Laravel, or a framework someone in-house wrote in 2009. Moved to a current, supported stack one route at a time.

When a framework migration makes sense

  • The framework itself is unmaintained or end-of-life: CodeIgniter 2 or 3, Symfony 2 to 4, Laravel 5, Zend Framework 1.
  • The in-house framework only one person ever understood, and that person has left.
  • You cannot hire developers who want to work on the current stack.
  • Every new feature takes longer than the last because the foundation fights back.

The strangler pattern, in practice

Instead of a rewrite next to the running system, the new framework is installed in front of the old one. Each route moves when it is ready, together with its tests:

  1. Install Symfony or Laravel in the same repository and route all requests through it.
  2. Unknown routes fall through to the legacy front controller, so nothing changes for users.
  3. Share sessions and authentication between both sides.
  4. Move routes one by one, starting with the ones that change most often.
  5. Delete legacy code as soon as nothing calls it.

Every step is deployable. If priorities change halfway, you still have a working application, half modern, with no lost work.

What I migrate

  • CodeIgniter 2 and 3 to CodeIgniter 4, Laravel or Symfony.
  • Older Symfony versions to the current Symfony LTS.
  • Older Laravel versions to the current release.
  • In-house and procedural PHP to Symfony or Laravel, or to API Platform when a separate frontend is planned.

Usually this goes together with a PHP 8 upgrade and the security fixes found along the way.

Ask about your migration

Questions

Symfony or Laravel?

Both are good choices. Symfony fits long-lived, complex domains and teams that want explicit configuration. Laravel is faster to work with for many product teams. I recommend one after the audit, based on your code and your team, not on fashion.

Can old and new code really run side by side?

Yes. The new framework sits in front and handles the routes that are already migrated, everything else falls through to the legacy front controller. Sessions and authentication are shared, so users do not notice the seam.

What about our database?

It stays. Doctrine or Eloquent models are mapped onto the existing tables, and schema changes come later through migrations, when there is a reason for them.