I am working on an OpenSocial project and its installed via composer. I am having a folder structure as below:

 - composer.json   
 - composer.lock   
 - html 
  (Drupal Installation.)
 - vendor 

When creating, should I add the all files including composer.json and vendor to git or just add the content of html directory?

Note In some cases, for example in a normal D8 installation the composer files and vendor directories are in the same directory as Drupal installation.


Short answer: no, you do not need to commit the vendor folder, because the contents are built using composer.lock and composer.json (both should be committed) when running composer install. Some people have to commit vendor due to their hosting constraints and/or having no build process (where the application is built for deployment).

IMO management via Composer with vanilla D8 tarball is very difficult as it lacks the structure to facilitate solid version control, project management and patching workflow that others like Drupal Project or Acquia BLT offer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.