Composer Manager
Dependency Manager for Drupal CMS
Who am i
• Lê Thanh Sang
• 6 years expereience as a Drupal developer
• Members of Drupal Association.
• Senior developer at www.go1.com.au
• Email: le@thanhsang.me
What is Composer
• Composer is a tool for dependency management
in PHP. It allows you to declare the dependent
libraries your project needs and it will install them
in your project for you.
• Composer is not a package manager. Yes, it deals
with "packages" or libraries, but it manages them
on a per-project basis, installing them in a
directory (e.g. vendor) inside your project. By
default it will never install anything globally. Thus,
it is a dependency manager.
Problem Composer solves
• You have a project that depends on a number of
libraries.
• Some of those libraries depend on other libraries.
• You declare the things you depend on.
• Composer finds out which versions of which
packages need to be installed, and installs them
(meaning it downloads them into your project)
System Requirements
• Composer requires PHP 5.3.2+ to run.
A challenge
• There are many challenges when using
Composer with Drupal, so the primary goal of
this module is to work around them by wrapping
Composer with common Drupal workflows so
that so that module developers and site builders
can use the thousands of standards-compliant,
platform agnostic PHP libraries with as little
friction as possible
Configuring Composer
Manager
• D7 & D8: admin/config/system/composer-
manager/settings
• D6: admin/settings/composer-manager/settings
How it work
• As modules are enabled and disabled, Composer
Manager gathers their requirements and
generates a consolidated composer.json file in the
"Composer File Directory" as configured in
Composer Manager's settings page. There are
two ways to install and update the contributed
modules' dependencies:
• Automatically With Drush (Recommended)
• Manually With Composer
Demo
Best Practices
• https://github.com/cpliakas/composer-manager-
docs#best-practices
Question
email: le@thanhsang.me

Composer manager module for Drupal

  • 1.
  • 2.
    Who am i •Lê Thanh Sang • 6 years expereience as a Drupal developer • Members of Drupal Association. • Senior developer at www.go1.com.au • Email: le@thanhsang.me
  • 3.
    What is Composer •Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. • Composer is not a package manager. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it will never install anything globally. Thus, it is a dependency manager.
  • 4.
    Problem Composer solves •You have a project that depends on a number of libraries. • Some of those libraries depend on other libraries. • You declare the things you depend on. • Composer finds out which versions of which packages need to be installed, and installs them (meaning it downloads them into your project)
  • 5.
    System Requirements • Composerrequires PHP 5.3.2+ to run.
  • 6.
    A challenge • Thereare many challenges when using Composer with Drupal, so the primary goal of this module is to work around them by wrapping Composer with common Drupal workflows so that so that module developers and site builders can use the thousands of standards-compliant, platform agnostic PHP libraries with as little friction as possible
  • 7.
    Configuring Composer Manager • D7& D8: admin/config/system/composer- manager/settings • D6: admin/settings/composer-manager/settings
  • 8.
    How it work •As modules are enabled and disabled, Composer Manager gathers their requirements and generates a consolidated composer.json file in the "Composer File Directory" as configured in Composer Manager's settings page. There are two ways to install and update the contributed modules' dependencies: • Automatically With Drush (Recommended) • Manually With Composer
  • 9.
  • 10.
  • 11.