Integrating DrupalConsole with an Acquia Lightning Project

November 28, 2016

Lightning, a base distribution maintained by Acquia, can sometimes have dependency conflicts when adding DrupalConsole. This guide explains how to resolve these issues and successfully integrate DrupalConsole into a project using the Lightning distribution.

The Lightning distribution repository is available on GitHub.

A reported issue details the dependency conflicts between the Lightning distribution and DrupalConsole.

Downloading the Lightning Distribution

[gist-embed data-gist-id="c5c6cda0640555becc618d9e64690560" data-gist-file="install-lightning.bash" data-gist-hide-footer="true" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Note the use of the --no-install flag. This skips the immediate installation of package dependencies, which is necessary to prevent conflicts during this process.

Downloading DrupalConsole

Follow the standard installation instructions from the DrupalConsole file.

[gist-embed data-gist-id="c5c6cda0640555becc618d9e64690560" data-gist-file="install-drupal-console.bash" data-gist-hide-footer="true" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

This command adds the DrupalConsole dependency to the composer.json file. Composer will then resolve and download the required packages for both Lightning and DrupalConsole together.

Adding DrupalConsole to an Existing Lightning Project

If you have an existing project that uses the Lightning distribution, you can add DrupalConsole by executing the following command.

[gist-embed data-gist-id="c5c6cda0640555becc618d9e64690560" data-gist-file="install-drupal-console-no-update.bash" data-gist-hide-footer="true" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

The --no-update flag adds the dependency to composer.json without immediately updating the project's packages.

Finally, execute the following composer command to update all project dependencies.

[gist-embed data-gist-id="c5c6cda0640555becc618d9e64690560" data-gist-file="composer-update.bash" data-gist-hide-footer="true" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Credit for this recommendation goes to a contributor on the .