Drupal 8: using Composer with Acquia Cloud

Using Composer Locally

Composer is a tool for managing dependencies for your web site (or application). At this time, Composer is not installed on Acquia Cloud servers. We recommend that you install Composer locally and use it with your local copy to perform updates and and manage dependencies, and then deploy that code to your environments on Acquia Cloud.

See Using Composer with Drupal 8 sites for additional installation information.

Commit your Vendor folder

By default the .gitignore file ignores the Vendor folder; this makes sense if you are using Composer on Acquia Cloud directly. Since you are using Composer locally, you should update the .gitignore to allow you to commit changes to your Vendor folder.

Using Composer in Drupal 8 prior to version 8.1

If you are using Drupal versions prior to Drupal 8.1, the Composer Manager module can be installed in your Drupal configuration to assist with management of Composer composer.json files. From the experience of our engineers, the Composer Manager module can be a tricky module on Acquia Cloud. However if you follow the Recommended Settings (at https://www.drupal.org/node/2405805) and apply the recommended "Production Environments" settings then it generally should work. More details can be found in this blog post from Acquia's Manager of Content Service Engineering, Chris Pliakas: https://dev.acquia.com/blog/using-composer-manager-get-island-now

Using Composer with versions Drupal 8.1 and later

As of Drupal 8.1, Drupal core directly uses Composer to manage dependencies, which can include Drupal modules. Rather than use Composer Manager, use Composer torequire the module. For more information, see:

Installing Composer on Acquia Cloud

It is possible to install Composer in Acquia Cloud, but it requires using the Live Development Workflow to be able to install Composer. Follow normal Git workflow for checking out the code, adding the changed flags, committing the changes and pushing to origin.

Contact supportStill need assistance? Contact Acquia Support