BLT 12 is faster and easier to install than any previous version, and now supports Drupal 9 as well. This guide will walk you through the major changes and upgrade process.
What's new in BLT 12
- Drupal 9 support! (Drupal 8 support is dropped due to mutual exclusivity in some of the dependencies such as Symfony)
- BLT 12 has far fewer Composer dependencies than previous versions, meaning that it can be installed faster and is less likely to cause version conflicts with other packages.
- Many less-utilized BLT commands (Probo) have been moved out of the core package and into "BLT plugins", which can be installed independently via Composer. This helps to significantly reduce the number of Composer dependencies in the core package.
- Much of the BLT environment detector has been moved to a standalone package. This doesn't affect users of BLT, but might support some users to use environment detection without the rest of BLT.
- The blt-require-dev package no longer exists. Instead, development dependencies can be added as BLT Plugins (standalone Composer packages). This means that you can choose which plugins/commands get deployed to production environments (by using
- (new projects only): BLT can now be more easily added to existing projects like any other Composer package, rather than having to start projects from scratch (using the BLT Project template). BLT Project will be maintained for backwards compatibility, but you can now add BLT to most distributions of your choosing instead.
- Support for PHP 7.4, Behat 3.4+, and Robo 2.
- Ensure that you are already using Composer Scaffold and not Drupal Scaffold. The following command should show that Composer Scaffold is installed:
composer show drupal/core-composer-scaffoldYou can migrate to Composer Scaffold using the following BLT command:
- You should only upgrade one major BLT version at a time (e.g. from 11 to 12). Do not skip versions.
- Ensure you are already on the latest/terminal release of your major BLT version. Do not upgrade from e.g. BLT 11.0 to 12.0 while skipping BLT 11.4.1.
- Use a tool such as the Upgrade Status module to check that your contributed dependencies are ready for Drupal 9. Remove any modules that do not yet support Drupal 9 if you want to continue with the upgrade process.
- Ensure your PHP requirement (in composer.json) is 7.3 or higher:
composer config platform.php 7.3
- Ensure your dependencies are already up to date, as this process will run a full Composer update:
How to upgrade
BLT 11 only supports Drupal 8, and BLT 12 only supports Drupal 9, meaning that you must upgrade to Drupal 9 and BLT 12 simultaneously.
- Remove blt-require-dev:
composer remove acquia/blt-require-dev
- Require BLT 12.x:
composer require acquia/blt:12.x-dev drupal/core-composer-scaffold:^9.0.0-beta2 drupal/core-recommended:^9.0.0-beta2 --no-update && composer update
- Restore any functionality that has been moved out of BLT core by installing the relevant plugin. For example, to add PHPCS:
composer require --dev acquia/blt-phpcs. The following plugins are available:
Modules known to be incompatible with Drupal 9 (at the time of this writing):
- acquia/lightning (requires 5.0.0-alpha1 or later)