composer manager module for drupal
DESCRIPTION
What is composer manager module for Drupal and the demo code using this module for drupal development module dev.TRANSCRIPT
Composer ManagerDependency 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: [email protected]
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
Questionemail: [email protected]