Adding Composer Packages to Drupal 8

By Kevin, January 13th, 2016

Adding Composer packages to Drupal 8 is pretty easy.

There is a module called Composer Manager that can be used to add packages that modules require, but there are instances where you just need a package (and no need to create a module).

A great example of this is the Drupal Behat Extension. If you’re like me and do a lot of behavior driven development, you likely have this, and if not, you need to get it.

To get the extension, run this in the command line (make sure you are not in the /core folder!):

composer require drupal/drupal-extension='3.1.5'


Now you can get a jumpstart with Behat on any Drupal project.