Jump to:

4962 Posts in 16029 Topics by 1489 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Using Composer to install and update modules

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

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

Page: 1 2
Go to End
Author Topic: 4558 Views
  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Using Composer to install and update modules Link to this post

    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

  • hutou
    Avatar
    Community Member
    6 Posts

    Re: Using Composer to install and update modules Link to this post

    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.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Using Composer to install and update modules Link to this post

    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".

  • hutou
    Avatar
    Community Member
    6 Posts

    Re: Using Composer to install and update modules Link to this post

    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.
    $

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Using Composer to install and update modules Link to this post

    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

  • hutou
    Avatar
    Community Member
    6 Posts

    Re: Using Composer to install and update modules Link to this post

    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

  • hutou
    Avatar
    Community Member
    6 Posts

    Re: Using Composer to install and update modules Link to this post

    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.

    4558 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.