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.

Installing SilverStripe /

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

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

Composer is creating full copies of modules under cms/ & framework/ - what are they?


Reply


3 Posts   554 Views

Avatar
vwd

Community Member, 160 Posts

5 January 2013 at 6:37pm

Hi,

When I run composer update on my straight SS3.0.3 install (from the silverstripe.org download link), Composer goes ahead and downloads and creates what appears to be a copy of various packages within the respective directories...

  • framework/ --> framework/silverstripe-sapphire-77f7778
  • cms/ --> cms/silverstripe-silverstripe-cms-d9e1bec

Are these backups of what was there before composer update?

Also, Composer adds vendor/autoload.php and a bunch of files under vendor/composer/? What are all these for?

Thank you.
VWD.

Avatar
Willr

Forum Moderator, 5513 Posts

10 January 2013 at 6:04pm

This is normal behaviour. Instead of putting your silverstripe modules as git submodules, svn externals you simply state your dependancies in the composer.json file and composer will download the modules (any dependancies as well) for you. You should then exclude all your composer'ed folders from your own version control (apart from composer.json and composer.lock). The autoloader stuff helps with automatically including classes from the library (but we don't make use of that feature at the moment as SS has it's own manifest builder)

Avatar
vwd

Community Member, 160 Posts

11 January 2013 at 5:11pm

Edited: 12/01/2013 6:44am

Thanks for your response Will.

So what are the directories:

  • framework/silverstripe-sapphire-77f7778
  • cms/silverstripe-silverstripe-cms-d9e1bec

Can I delete these? Are they backup directories? Composer seems to only create these directories when the module already is present before Composer takes control.

Thanks for explaining what the vendor/autoload.php does.

Thanks,
VWD