Using Composer manager

Drupal 8 has an interesting predicament. It utilizes third-party PHP libraries Proudly Built Elsewhere that are managed through Composer. However, the packages managed by Composer are committed into version control and Composer is (as of 8.0.x) not part of the Drupal build or installation process.

The Composer manager module provides a way to fully support a Composer-based workflow when working with Drupal. Drupal Commerce requires a Composer-based workflow because it uses third-party PHP libraries. In this recipe, we will examine the Drupal Commerce composer.json file and install the module.


Ideally, future versions of Drupal, such as 8.1.x or 8.2.x, will remove the need for the Composer manager and the previous recipe ...

Get Drupal 8 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.