2. About me
• CTO and partner at Reload! A/S
• Ding.Core team member
• Maintainer of wsdl2phpgenerator
• Interested in developer workflows
automation and code quality.
• kasper@reload.dk / @kasperg
3. • Drupal development agency
• 15 people
• Office in Frederiksberg
• Specialists in agile development,
complex solutions, integrations
and consultancy
• Clients include Danish Radio, IDA,
Samvirke, STOFA, TV2 and others
4.
5. What is wrong about Drush Make?
• Making is slow
• Making is frail
• Drush Make is not intended for rebuilding
6.
7. Get off the island […] get
involved in the wider PHP
community, both to learn
from it and to share with it.
– Larry Garfield, Drupal Core contribuor, 31 December 2012
!
!
!
8. What is right about Drush Make
• Overview of used
projects
• Supports patching
• Support for non-Drupal
code
projects[feedback_simple][subdir] = contrib
projects[feedback_simple][version] = 1.6
!
projects[feeds][subdir] = contrib
projects[feeds][version] = 2.0-alpha7
; Support the use of summary on body fields. Summary here
; is the built-in teaser in Drupal.
projects[feeds][patch][962912] = http://drupal.org/files/
node-summary-mapper-962912-11.patch
!
libraries[chosen][download][type] = git
libraries[chosen][download][url] = https://github.com/
harvesthq/chosen.git
libraries[chosen][download][revision] = v0.9.9
11. What is Composer?
Composer is a project dependency manager,
not a package manager.
!
Inspired by Ruby Bundler and Node.JS npm
!
Cross-platform compatible (Windows, Linux, and OSX)
Requires >= PHP 5.3.2 and
optionally Subversion, GIT, and/or Mercurial
!
Released in 2011 under the MIT license
Developed by: Nils Adermann and Jordi Boggiano
14. Packagist
• Over 40.000 packages
• Default package repository for
Composer
• Contains nearly every widely used
open source PHP package
• Free accounts to register and
maintain own packages
19. Drupal Core
• Located in the root directory of the
project
• Use Composer custom installers
• Example: Composer non-destructive
archive installer
• https://github.com/azt3k/non-destructive-
archive-installer
20. Modules and themes I
• Composer repository for Drupal
projects
• Developed by Will Milton
Lead technology architect, Promet
Source
• http://static.drupal-packagist.org/
v0.2.0/
• Source: https://github.com/
winmillwill/drupal-parse-composer
21. Modules and themes II
• Package naming:
drupal/[project-name]
• Version naming:
[drupal-major-version].
[project-major-version].
[project-minor-version]
• http://static.drupal-packagist.org/
v0.2.0/
• Source: https://github.com/
winmillwill/drupal-parse-composer
22. Modules and themes III
• Move projects to the appropriate
location using Composer Installers
• http://composer.github.io/installers/
• Supports individual projects and
types including drupal-module,
drupal-theme, drupal-profile,
drupal-drush
23. Patches
• Composer does not support
patching projects. It promotes a
fork/pullrequest-based workflow.
• Use Composer Patches Plugin
• Developed for TYPO3
• https://github.com/netresearch/
composer-patches-plugin
24. Libraries
• Packagist packages can be added
through requires
• Includes PHP but also JS, CSS!
• Packages without composer support
can be defined manually through
composer.json
• Same approach applies for
sandboxes
25. Wrap up
• Composer can support the same use
cases as Drush Make in the
development process and more
through community work.
• Enables tapping into and sharing
with the PHP community at large.
By Richard Paterson, https://flic.kr/p/6wnBHM
26. Project template
• Use a project template to get
started and avoid repeating
boilerplate configuration
• php composer.phar create-project
reload/drupal-composer-project
some-dir --stability dev —no-interaction
• https://github.com/reload/drupal-composer-
project
28. Drupal composer repository
• drupal.org must provide an
authoritative Composer repository
for Drupal packages.
• Could replace updates.drupal.org
over time.
• Until then: Continued work on
static.drupal-packagist.org.
29. !
The Future of Drush
• Relevant as ever
• Reduced scope
• make and dl no longer
needed
30. What about Drupal 8?
• Already has a composer.json file
in the project root.
• Better directory structure makes
things a lot easier.
• Drupal 8 core directory subslit can be
used as a Composer package
• https://github.com/tstoeckler/
drupal-core
31. Suomisvej 2, 2. sal
1927 Frederiksberg
reload.dk
kontakt@reload.dk
!