Goal
This document addresses the most common uses of BLT and provides guidance in how to replace them. If you use more advanced BLT feature you can reach out to Acquia PS.
Prerequisites
- https://dev.acquia.com/tutorial/you-dont-need-blt-acquia-cloud
Overview
BLT has been an invaluable tool for developers, offering a structured and opinionated approach to navigating various workflows in the development cycle. It provided a suite of commands such as sync, deploy, and others, along with Cloud hooks to automate tasks post-code deployment or database copy. Additionally, BLT's "command hooks" allowed users to extend functionality as needed, such as building frontend requirements and assets.
Acquia BLT also introduced some settings "magic," enabling configuration splits, including Memcached configuration, and the addition of extra configuration-oriented files through organized *.settings.php files. While our documentation provides basic examples and reflects some of the necessary changes, this guide aims to be a comprehensive resource to help you transition smoothly from BLT.
Using ACLI and Composer Scripts
For most cases, the tools that you are going to need are ACLI and Composer scripts. Here are some useful links:
Your local dev environment may have easy-install options for ACLI. Lando, DDEV, and Docksal all integrate nicely with ACLI. More info about this here.
It is important to make sure ACLI is installed and configured correctly. Typing lando acli, ddev acli, fin acli will confirm that ACLI is working correctly
-
The BLT Settings goodies
To continue benefiting from the configuration enhancements of BLT, Acquia recommends using the Drupal Recommended Settings Plugin (DRS). In the linked docs, you can also find specific information on migrating this part of BLT to the DRS plugin. Once the migration is done, you should have most of the functionality of BLT already in your codebase. If you are using Acquia Site Factory, check the specific section about using DRS with ACSF.
- Confirm that you are on the latest version of BLT 13.
- Install the new BLT 14:
composer require acquia/blt:^14- Run the blt migrate command:
./vendor/bin/blt blt:migrate- You should see this message:
[WARNING] This script will update following files from site [default] with following changes. -------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- File Snippet to remove Snippet to add -------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- settings.php require DRUPAL_ROOT . "/../vendor/acquia/blt/settings/blt.settings.php"; require DRUPAL_ROOT . "/../vendor/acquia/drupal-recommended-settings/settings/acquia-recommended.settings.php"; settings.php /** /** * IMPORTANT. * IMPORTANT. * * * Do not include additional settings here. Instead, add them to settings * Do not include additional settings here. Instead, add them to settings * included by `blt.settings.php`. See BLT's documentation for more detail. * included by `acquia-recommended.settings.php`. See Acquia's documentation for more detail. * * * @link https://docs.acquia.com/blt/ * @link https://docs.acquia.com/ */ */ settings.php use Acquia\Blt\Robo\Common\EnvironmentDetector; use Acquia\Drupal\RecommendedSettings\Helpers\EnvironmentDetector; local.settings.php blt_override_config_directories drs_override_config_directories -------------------- ----------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------