Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Using Composer to install and update modules

Go to End

15 Posts   15866 Views


Community Member, 29 Posts

16 November 2012 at 6:59am

Hi, I'm just testing out using Composer to install a site and modules by following the instructions here:

The site installs fine and I'm able to set it up through my browser. However, I'm having problems running 'composer update', or installing modules such as 'composer require silverstripe/subsites:*'.

I basically get the same error message:

"composer.json has been updated
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package silverstripe/cms 1.0.0 could not be found.
Problem 2
- The requested package silverstripe/framework 1.0.0 could not be found."

Any ideas what's happening here? Thanks :)


Community Member, 29 Posts

16 November 2012 at 9:18am

Having had a closer look at the files I tried updating the composer.json file and this seems to have done the trick.

Initially there's a section that says:

"silverstripe/cms": "self.version",
"silverstripe/framework": "self.version",

I changed this to:

"silverstripe/cms": "*",
"silverstripe/framework": "*",

I don't know if this is the correct thing to do, but it seems to work. If anyone can tell me if what I've done is ok that would be much appreciated. Thanks.


Community Member, 70 Posts

21 November 2012 at 9:26pm

hi _Matt

Thanks for that, got me past the same problem.




Community Member, 70 Posts

22 November 2012 at 1:42am

Edited: 22/11/2012 1:42am


With the addition of the blog and forum modules, I ended up with the following in my composer.json file:

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

I had to set the version number for the framework and cms explicitly as otherwise the head of master was used, which is not what I want.




Forum Moderator, 801 Posts

22 November 2012 at 6:02am

The "composer create-project" command is trickier than it looks...
If you install from a tag like, it'll use the github-generated ZIPs by default, for both root and dependencies.
Which means it can't infer version information from git on a "composer require" or "composer update" call.
You can verify which version composer thinks its on by using "composer show --self".

Using the ZIPs is much, much faster than a full git checkout, so in general its a good default,
if it wasn't for that limitation around version introspection.

Symfony gets around this by requiring release branches in their composer.json, rather than "self.version":
That's not great either though, as it means "create-project" with a tag argument is not actually respected in dependencies.

Related discussions:

Some stopgap fixes:
- install from a branch (3.0.x-dev)
- use the "--prefer-source" flag

I think in the end, composer needs to track this information somewhere in its metadata.


Community Member, 70 Posts

22 November 2012 at 7:27am

hi Ingo

Thanks for the feedback, I will read the discussions tomorrow




Community Member, 70 Posts

22 November 2012 at 4:34pm

hi Ingo

Ok I think I understand the issue with version introspection now, thanks for your detailed reply. Looking at the symfony example, it does look like version numbers need to be hardcoded in composer.json which is not ideal, as it prevents the automatic update for new versions of modules when running composer update. In effect, it is almost like creating the lock file.

The documentation for installing SilverStripe using Composer is with respect to the above problems incorrect and needs fixing. Is the most appropriate place to register a documentation issue?




Administrator, 690 Posts

22 November 2012 at 6:18pm

I think the fix we need to make is to patch silverstripe/installer ( to have hard-coded version references.

Perhaps we can do this before 3.0.3?

Go to Top