1

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
    (Dependencies)

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

In some cases, for example in a normal Drupal 8 installation the Composer files and the vendor directory are in the same directory as the Drupal files.

0

1 Answer 1

4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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