composer is taking over drupal 8
TRANSCRIPT
Composer is taking over Drupal 8
See everything as a library!
See everything as a library!
generic libraries hosted outside of the drupal ecosystem
attracts Drupal and non-drupal developers
Especially for 3rd-party integrations
drupal.module
drupal.module
Library 1
Library 2Drupal 7
Advantages of the library approach
Advantages of the library approach
Hop of the islandA bigger crowd to create sustainable
solutionsLess migration work on core upgradesmore agile development processeasy update with `composer update`
Disadvantages of the library approach
Disadvantages of the library approach
Code is spread outCentralization benefit of drupal.org
gets lostMultisite troubles and risks
Platform needs to be seen as a whole
Composer in Real-Life
Composer in Real-Life
Mailchimp module:Mailchimp libraryAddress moduleCommerceguys address libraryCommerceguys intl libraryCommerceguys zone librarySearch API Solrsolarium/solariumGeocoderwilldurand/geocoder
The contrib composer workflow
The contrib composer workflow
download your module as usual
always! resolve your composer dependencies before installing a new module
enable the module
Composer Manager
Composer Manager
Offers the `composer drupal-update` command
own report page in admin UIit acts globally on the platformavoid dependencies on that modulemight be deprecated in mid-term
Composer and Ægir
Composer and Ægir
currently no composer supportsite migrations will failWorkaround:
copy the site manuallyresolve dependenciesperform the migration
Outside of the box
Outside of the box
The composer workflow could extended even more
Using composer.json instead of makes`drush make` -> composer.json
composer create-project drupal-composer/drupal-project:~8.1 drupal --stability dev --no-interaction
`drush dl migrate_tools --dev`composer require drupal/migrate_plus 8.1.*@dev
Any questions?