Composer: Using external libraries in your modules

Drupal 8 has a whole new philosophy of "proudly developed elsewhere" with the addition of Symfony2 components and numerous other PHP libraries via Composer. Composer is a external PHP library dependency manager, written by the authors of Symfony2, and the tool used to make all of these external libraries work together in Drupal 8 core in a harmonious way.

How do we make the most of this approach in our contributed modules?

In this session I will discuss a new style of development, which promotes well structured, documented, and tested libraries that are shared and re-used within Drupal contrib, and across the rest of the PHP open source community. And we don't need to wait for Drupal 8, we can start now.

In this session I will cover:

  • How composer dependency management works
  • How to structure you module code to re-use existing libraries with composer
  • How to refactor your module code into re-usable libraries and share them
Schedule info
Status: 
Proposed
Session Info
Speaker(s): 
Track: 
Coding + Development
Experience level: 
Advanced

Comments

Sounds like important information for anyone planning to develop modules for D8.

This is stuff people are going to need to know - Drupal can no longer be an island and properly integrating with external libraries is a key skill to learn after you've passed the more standard Drupal hurdles.