Saravanan
Saravanan

Reputation: 1889

Downgrading Symfony2 from 2.4.1 to 2.3.9

I have started an application development on Symfony2.4.1. But later decided to go back to Symfony2.3.9 as it has long term support. Is there any procedure to downgrade (Found no luck on Google), or I have to download 2.3.9 and push all my code there?

Upvotes: 6

Views: 12674

Answers (1)

pagliuca
pagliuca

Reputation: 1209

I have just managed to downgrade my Symfony 2.4.1 to 2.3.9.

1) Update composer.json

Remove 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 ones:

"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 monolog config

Comment (with #) or remove 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

Those configuration options were not available in 2.3.*, so they cause errors if not removed.

3) Run composer

php composer.phar update

4) Clear the cache (the old way)

After updating composer, I couldn't clear the cache through app/console (it returned an exception).

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

5) Enjoy LTS!

Long term support is always good :)

Upvotes: 12

Related Questions