Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installation via composer.json vs "composer create-project"

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

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

Page: 1
Go to End
Author Topic: 822 Views
  • elementz
    Avatar
    Community Member
    2 Posts

    Installation via composer.json vs "composer create-project" Link to this post

    I am having trouble setting up silverstripe via a package definition provided via package.json.

    When installing via composer create-project silverstripe/installer ./my/website/folder (as outlined in the doc) the subdirectory ./mysite including the _config.php gets created, whereas when installing via composer install using the package definition, the ./mysite folder won't get created.

    I have tried including silverstripe/installer in the package defintion but that does not resolve the issue.

    Here's my current package.json:

    {
    "name": "silverstripe/installer",
    "description": "The SilverStripe Framework Installer",
    "require": {
    "silverstripe/installer":"@dev",
    "silverstripe/cms": "3.1.0",
    "silverstripe/framework": "3.1.0",
    "silverstripe-themes/simple": "*",
    "stage1/docker-php": "@dev"

    },
    "require-dev": {
    "silverstripe/compass": "*",
    "silverstripe/docsviewer": "*",
    },
    "minimum-stability": "dev"
    }

    Maybe someone could help me understand when and how to use which installation method (i.e. package.json vs composer create-project).

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Installation via composer.json vs "composer create-project" Link to this post

    Are you sure you want a package.json file? That's only used to describe a package in its entirety, including all version data. Usually that's provided by packagist.org, you don't need one yourself. You should create your own composer.json in the root of your project, and can use the silverstripe/installer one as a starting point: http://doc.silverstripe.org/framework/en/installation/composer#manually-editing-composer-json

  • elementz
    Avatar
    Community Member
    2 Posts

    Re: Installation via composer.json vs "composer create-project" Link to this post

    Ingo, thank you for replying.
    Where I said package.json I actually meant composer.json. Sorry for the mixup.
    My quesion still stands though.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Installation via composer.json vs "composer create-project" Link to this post

    Can you please post your composer.json (or put it on gist.github.com)?

    822 Views
Page: 1
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.