简体   繁体   中英

Update symfony 2 version / composer.lock

I want to upgrade symfony to 2.6.

Right now it is version 2.4.

When i change my composer.json to :

"symfony/symfony": "~2.6",

and then run the :

composer:update

It doesn't do anything. I have a composer.lock inside my project. How can i ignore this file and update my symfony2 project to a newer version?

Thanks!

The correct command is

composer update

or, if you don't have composer installed globally,

php composer.phar update

You should also change _branch_-alias :

"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "_branch-alias": {
        "dev-master": "2.6-dev"
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM