Todd Valentine
Todd Valentine

Reputation: 185

update to silverstripe 3.1 using composer

Is it possible to update my project to the beta release of Silverstripe 3.1 using composer?

I have composer installed as well as a composer.json file in the root of my Silverstripe project. Here is my composer.json file:

{
"name": "silverstripe/installer",
"description": "The SilverStripe Framework Installer",
"require": {
    "php": ">=5.3.2",
    "silverstripe/cms": "3.0.*@stable",
    "silverstripe/framework": "3.0.*@stable",
    "silverstripe-themes/simple": "*"
},
"require-dev": {
    "silverstripe/compass": "*",
    "silverstripe/docsviewer": "*"
},
"minimum-stability": "dev"

}

When I run composer update /Path/To/My/Site

Composer tells me that it cannot find the composer.json file even though it is there.

Am I running the wrong command?

Thanks.

Upvotes: 0

Views: 1269

Answers (1)

Ingo Schommer
Ingo Schommer

Reputation: 716

You'll need to remove the "composer.lock" file (if existing), replace "3.0.*@stable" with "3.1.x-dev", and call "composer update". That'll get you the latest 3.1 branch.

Its not possible to upgrade to 3.1.0-beta1 this way, because I've mucked up the composer.json dependencies in the tag. You'll need to create a new project for that, based on the composer.lock file committed to this tag:

composer create-project silverstripe/installer test 3.1.0-beta1

Upvotes: 2

Related Questions