How to upgrade a fully developed project in Symfony 2.0.16 to Symfony 2.1.0?

I developed a project in symfony2.0.16. Now I would like to upgrade to sysmfony2.1.0.

As I read from https://github.com/symfony/symfony/blob/master/UPGRADE-2.1.md , a lot has changed compared to the previous version (2.0).

Do I need to find and replace my old code snippets and reorganize them manullay or is there some command or better way to do this?

For example, as indicated in the update docs:

Before: {{ app.request.session.locale }} or {{ app.session.locale }} After: {{ app.request.locale }} 

Do I really need to refactor (find and replace) all {{ app.request.session.locale }} in my huge project before {{ app.request.locale }} ? Any suggestion on how to reorganize if this is the only way.

+4
source share
2 answers

As others have already noted, there is no automatic tool that can do this for you, at least from the official developers of the platform.

The biggest changes were made to the form component, which has changed a lot since version 2.0. In general, I know that this is a difficult task, because you need to find and replace things, but in general it should be a matter of one day or half a day.

In addition, it is likely that you are not using all and all the features that have been changed since Symfony 2.0. This means that you will not need to change the code for each point of update notes.

In my case, I did for each bullet, first check if I used this function, and then went into search and replace mode.

It should go pretty fast. It's a long time, but you can do it :)

Good luck Matt

+6
source

The best way is to create a project structure from the new version and combine all the old functions one by one.

+2
source

Source: https://habr.com/ru/post/1432757/


All Articles