smoreno
smoreno

Reputation: 3550

Changing symfony to specific stable version

I'm developing an app using symfony syncronized with master branch. Now i want to switch to latest stable release (v2.1.1) using composer. I have the composer.json file with "symfony/symfony": "2.1.*". I change it with "v2.1.1" and switch to correct version, but others core bundles still in master branches.

Should I edit manually my composer.lock file with specific versions in v2.1.1 and conserve my own bundles?

Could you describe to me the correct procedure to achieve this?

Upvotes: 3

Views: 2249

Answers (2)

smoreno
smoreno

Reputation: 3550

I found this on Symfony cookbook:

Upgrading Symfony

Since Symfony is just a group of third-party libraries and third-party libraries are entirely controlled through composer.json and composer.lock, upgrading Symfony means simply upgrading each of these files to match their state in the latest Symfony Standard Edition. Of course, if you've added new entries to composer.json, be sure to replace only the original parts (i.e. be sure not to also delete any of your custom entries).

Upvotes: 0

mrzard
mrzard

Reputation: 311

The best way to go is to change versions in composer.json file, then run composer.phar update name-of-package/to-update1 name-of-package/to-update2... and so forth. That will take care of composer.lock in the correct way. This is for packages that are not dependencies of symfony.

If you are only worried about the core symfony dependencies, don't be, they will be updated accordingly to the symfony/symfony package version.

Also, this is a composer question more than a symfony one :) This is a great presentation by Rafael Dohms about Composer

Upvotes: 4

Related Questions