-4

How time consuming is migrating a medium/large sized legacy Symfony application from version 2.3 to 4.4 compared to rewriting it in a different framework?

From the research I've done it seems like quite a lot of stuff has changed between these versions so I'm trying to weigh this decision up against just rewriting the whole thing in Laravel (the framework I'm experienced in). I'm trying not to get stuck in a wormhole of rewriting abandoned code.

The main reason for the upgrade is security fixes, running Symfony 2.3 in 2021 doesn't seem like the best idea to me. The codebase won't need any changes in the near future.

Following is an overview of used packages. composer outdated --direct

Robbe R
  • 23
  • 1
  • 7
  • You've answered your own question? "*The main reason for the upgrade is security fixes, running Symfony 2.3 in 2021 doesn't seem like the best idea to me.*" – 0stone0 Dec 06 '21 at 17:03
  • I've reformulated my question. I'm trying to figure out the hurdles of the upgrading process in order to give our client an estimate time of the upgrade. – Robbe R Dec 06 '21 at 17:07
  • The next LTS version of Symfony, 5.4, was just released so if they are going to pay for upgrading then they may as well upgrade to the latest and greatest. If you have Symfony developers then upgrading is not too bad. It's the non-maintained 3rd party stuff that can cause problems. If you are more of a Laravel person then it might make sense to port it to Laravel. For Symfony I would suggest creating a fresh project then using composer require for each of the third party packages. That will give you a good idea of how much fun lies ahead. – Cerad Dec 06 '21 at 20:55

1 Answers1

3

Upgading you symfony version that much means 3 steps:

  • upgrading your php version (PHP 5.3.3 to 7.1.3)
  • upgrading your package (most of them will not work any more or have lot of changes)
  • upgrading symfony

It mostly depends of your code coverage: if you have a good code coverage, you will be able to quickly identify remainings bug

otherwise it depends on your legacy:

  1. are best practice used?
  2. is the code clear?
  3. is the code well decomposed?

For larger project, i don't recommand to create a new one: it cost a lot of money and may prouce bugs and regression

The best way to do it is step by step. Determine which package to upgrade one by one, do it and push it in production with the apropriate code coverage.

Start with your php version: on local, have your devellopement be run in higher php version to identify most bugs and correct them

Manage each of your abandonned project to replace them with the recommended one

  • we had to deal with phpexcel to php spreadsheet. We identify each place where it was used in the application, and update each of them, one by one (having both package on project). When phpexcel wasn't used anymore, we deleted it
Florent Cardot
  • 1,400
  • 1
  • 10
  • 19
  • Thanks for your reply! Unfortunately I'm not very familiar with the codebase myself (written by someone who's left the company) so It's gonna be a shot in the dark. Last year we've spent over 100 working hours upgrading another Symfony site from 2.3 to 3.4 so I'm hoping that 3.4 to 4.4 doesn't bring any nasty surprises along on this one. Perhaps I should take a closer look at some more upgrade guides to get a closer estimate. Thanks for the tips :) – Robbe R Dec 06 '21 at 18:20