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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Use Composer to install modules


Go to End


2 Posts   852 Views

Avatar
FrankVo

Community Member, 1 Post

11 January 2017 at 2:43am

HI, I am new with Silverstripe CMS so I don´t really know how to use Composer to install a module.
Also there is no way to simply download a module anywhere ?

Where do i put this for example ?:

composer require silverstripe/userforms dev-master

Avatar
martimiz

Forum Moderator, 1391 Posts

3 February 2017 at 3:33am

Edited: 03/02/2017 3:39am

Composer would have to be installed on your server. And the you would type this from the command line in your site root.

Mostly you can download modules as zip packages from github:

Find the link to the github depository on the SilverStripe addons page for the selected module (see next to 'Homepage:) Then on GitHub, look for the green button on the right (clone or download) and select 'download zip'

Modules often come in different versions, supporting different versions of SilverStripe. On github you can select different 'branches' and/or 'tags' (grey-ish button on the left) and check the README displayed underneath. Note that the 'master' branch may sometimes be somewhat experimental - or already aiming at SilverStripe 4!

EDIT & WARNING:
Often modules may depend on other modules being present. Each module has a composer.json file, optionally with a list of requirements, that you'd have to download as well. Normally Composer would take care of that for you. Be aware that these dependencies may have their own dependencies, and some of them may be from external parties. So I'd still advise to use composer if at all possible.

https://docs.silverstripe.org/en/3/getting_started/composer/