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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   19711 Views

Avatar
Ingo

Forum Moderator, 801 Posts

23 November 2012 at 3:10am

Filed a bug with composer: https://github.com/composer/composer/issues/1351

Hm, hardcoding versions will be a royal pain in terms of release management - you'd have to remember to commit those *just* before tagging, each time. We could read/write the composer.json dynamically with the "phing tag" build command, but that sounds like a lot of work for a stopgap solution.

But more importantly, it breaks the collaboration model. We ask people to simply use "composer update --dev" to get started if they want to contribute. That won't work, since framework and cms will still be at the checked out tag.

For now, I've updated the contributing chapter: https://github.com/silverstripe/sapphire/commit/96acd5068129b9098768ee5ab8431fcfa34db9d7

Avatar
hutou

Community Member, 9 Posts

4 October 2013 at 11:26am

Hi,
I am new to SilverStripe, and encounter the same problem as described by _Matt on nov 16,2012.

I do not see any information about this problem in the documentation page at http://doc.silverstripe.org/framework/en/installation/composer. Is it about to be solved ?

If not, is the method suggested in this thread the 'official' one for the moment ?

Thanks for your advice.

Avatar
Ingo

Forum Moderator, 801 Posts

4 October 2013 at 12:44pm

Can you run a "composer selfupdate" to ensure you're on the latest version?
If you're trying to add a module, do it via "composer require -vvv <module>" and paste the output here.
Otherwise paste the specific error message you're getting on "composer install" or "composer update".

Avatar
hutou

Community Member, 9 Posts

4 October 2013 at 7:49pm

Ok, here is my session log.
Thanks.

$ ./composer.phar selfupdate
You are using the latest composer version.

$ sudo mv composer.phar /usr/bin/composer

$ cd /home/www/shingan31
$ composer require -vvv silverstripe/sqlite3 dev-master
./composer.json has been updated
Reading ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/hubert/.composer/cache/repo/https---packagist.org/packages.json into cache
Downloading https://packagist.org/p/provider-active$994196c885d92dd9a041a00e6ed6b7cf893e63ef4d2c010647b757f7b7e85d3d.json
Writing /home/hubert/.composer/cache/repo/https---packagist.org/p-provider-active.json into cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Downloading https://packagist.org/p/provider-latest$c2f6c4a0c3251485fd8950006595161dde3ef7dd6bea306ee94adb0046a3e0dc.json
Writing /home/hubert/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/p-provider-stale.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$installer.json from cache
Updating dependencies (including require-dev)
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$cms.json from cache
Downloading http://packagist.org/p/silverstripe/framework$587a7a5a6521f66c71195478eb0142e01e3badb2e519bd01a21ac1514497ce18.json
Writing /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$framework.json into cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe-themes$simple.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$sqlite3.json from cache
Reading ./composer.lock
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-composer$installers.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-shama$baton.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$reports.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe-themes$blackcandy.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$recaptcha.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$mobile.json from cache
Reading /home/hubert/.composer/cache/repo/https---packagist.org/provider-silverstripe$spamprotection.json from cache
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.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion>; for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md>; for further common problems.

Installation failed, reverting ./composer.json to its original content.
$ 

Avatar
Ingo

Forum Moderator, 801 Posts

4 October 2013 at 10:24pm

You need to retain VCS information in the base installation in case you've done it through "composer create-project".
Composer commands don't work on archive downloads from silverstripe.org. That's a limitation by Composer, not us.
I've created a FAQ entry: http://doc.silverstripe.org/framework/en/3.1/installation/composer#faq

Avatar
hutou

Community Member, 9 Posts

5 October 2013 at 1:03am

Sorry, but I read and re-read your answer and the FAQ and I still don't understand where I was wrong (and still don't know what to do either !)
I just followed the instructions on your site for the installation of SS3 via composer. SS3 install is Ok but I can't install any module after that.
Thanks for your help

Avatar
hutou

Community Member, 9 Posts

6 October 2013 at 8:13am

Finally, I found out why!
I installed SilverStripe with the composer create-project command ending with the version number (3.1.0).
I shouldn't !
Perhaps the documentation should further emphasize this point to avoid for beginners like me to be blocked.

Go to Top