composer manager module for drupal

11

Click here to load reader

Upload: le-thanh-sang

Post on 19-Aug-2014

323 views

Category:

Engineering


4 download

DESCRIPTION

What is composer manager module for Drupal and the demo code using this module for drupal development module dev.

TRANSCRIPT

Page 1: Composer manager module for Drupal

Composer ManagerDependency Manager for Drupal CMS

Page 2: Composer manager module for Drupal

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]

Page 3: Composer manager module for Drupal

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.

Page 4: Composer manager module for Drupal

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)

Page 5: Composer manager module for Drupal

System Requirements

• Composer requires PHP 5.3.2+ to run.

Page 6: Composer manager module for Drupal

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

Page 7: Composer manager module for Drupal

Configuring Composer Manager

• D7 & D8: admin/config/system/composer-manager/settings

• D6: admin/settings/composer-manager/settings

Page 8: Composer manager module for Drupal

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

Page 9: Composer manager module for Drupal

Demo

Page 10: Composer manager module for Drupal

Best Practices

• https://github.com/cpliakas/composer-manager-docs#best-practices