Question

I need to upgrade an existing rather large application from Symfony 2.0.15 to Symfony 2.4.x (replace with current version).

I'm not quite sure what would be the best strategy to do so. Migration critical features like forms or esi are used, of course :)

  1. Upgrade "step by step" from one major version to another (2.1, 2.2, 2.3, 2.4)
  2. Upgrade directly from 2.0.x to 2.4

Do you have any tips / experience to share ? Would appreciate it :)

Thanks, Stephan

Was it helpful?

Solution

Each new version comes with an update UPGRADE-2.x.md file containing all intructions to convert your application from the immediately previous version.

I had to do that on my project as well, and I found the step-by-step method more natural and easier to manage. Fact is, there is no file such file as UPGRADE-2.0-to-2.4.md that would help you out for a direct conversion to 2.4.

I shall first recommend to make sure that none of your code uses obsolete functionnalities of Symfony 2.0 (not sure if there are deprecated parts in this version, though), because these can be removed in ulterior versions and will not be included in the UPGRADE file.

If you have done indeep modifications of the core Symfony code, you may find that some undocumented modifications are needed. For instance, there is a custom error handler in my project, extending the Symfony error handler. Well, although it was not documented in the UPGRADE file, the signature of ErrorHandler::handle() was modified and needed to be updated in my custom handler.

Similarly, I had to modify some namespaces because files had been moved in the framework code.

The conversion is still ongoing and I'm currently experiencing a weird error I'm trying to get rid of: The 'request' scope on services registered on custom events generates errors in the logs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top