Symfony2 downgrade from 2.4.1 to 2.3.9

I started developing the application on Symfony2.4.1 . But later he decided to return to Symfony2.3.9 , since it has long-term support . Is there any procedure for downgrading (I didnโ€™t find any luck on Google), or do I need to download 2.3.9 and click all my code there?

+6
source share
1 answer

I just managed to downgrade my Symfony 2.4.1 to 2.3.9.

1) Update composer .json

Delete the following lines:

"symfony/symfony": "~2.4", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": "~1.2", "twig/extensions": "~1.0", "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~2.3", "sensio/framework-extra-bundle": "~3.0", "sensio/generator-bundle": "~2.3", 

And add the following:

 "symfony/symfony": "2.3.*", "doctrine/orm": ">=2.2.3,<2.4-dev", "doctrine/doctrine-bundle": "1.2.*", "twig/extensions": "1.0.*", "symfony/assetic-bundle": "2.3.*", "symfony/swiftmailer-bundle": "2.3.*", "symfony/monolog-bundle": "2.3.*", "sensio/distribution-bundle": "2.3.*", "sensio/framework-extra-bundle": "2.3.*", "sensio/generator-bundle": "2.3.*", 

2) Update monologues configuration

Comment (C #) or delete the following lines in app / config / config_dev.yml:

 console: type: console bubble: false 

And do the same in app / config / config_prod.yml:

 console: type: console 

These configuration options are not available in version 2.3. *, so they cause errors if not deleted.

3) Run the composer

 php composer.phar update 

4) Clear cache (old way)

After updating the composer, I could not clear the cache through app/console (it returned an exception).

Instead, I had to delete the dev and prod folders inside app/cache/ .

5) Enjoy LTS!

Long-term support is always good :)

+12
source

All Articles