The average Drupal Commerce site depends on many external PHP libraries. Address needs commerceguys/addressing and Commerce needs commerceguys/intl. GeoIP needs geoip2/geoip2 and Search API Solr needs solarium/solarium. Each payment gateway needs a matching SDK. These libraries must be downloaded separately, because license constraints prevent us from committing their code to drupal.org itself. For the past 5 years, the primary and only way to download and use PHP libraries has been Composer, a command line tool. Composer works per-project, meaning each Drupal install has one folder for all PHP libraries it requires, regardless of which module needs which. This allows Composer to detect and prevent conflicts such as incompatible library versions. Composer also recursively resolves dependencies, automatically installing and updating packages required by other packages. This is a major benefit to Drupal site administrators compared to previous tools like Drush Make. However, Drupal’s reliance on the Composer-generated autoloader makes it impossible…

Read More →