On project using BLT, the good practice is to not change the sites/default/settings.php file generated by BLT and to use the files automatically loaded by blt.settings.php instead.
Following the good practice, it is currently not possible to do anything before Acquia Cloud settings are loaded
$settings_files = [];
[....]
// Acquia Cloud settings.
if (EnvironmentDetector::isAhEnv()) {
try {
if (!EnvironmentDetector::isAcsfEnv()) {
// Pull in Acquia environment settings file. This eliminates the need to
// add the Acquia require line in settings.php.
$settings_files[] = FilePaths::ahSettingsFile(EnvironmentDetector::getAhGroup(), $site_name);
}
}
catch (BltException $e) {
trigger_error($e->getMessage(), E_USER_WARNING);
}
// Store API Keys and things outside of version control.
// @see settings/sample-secrets.settings.php for sample code.
// @see https://docs.acquia.com/resource/secrets/#secrets-settings-php-file
$settings_files[] = EnvironmentDetector::getAhFilesRoot() . '/secrets.settings.php';
$settings_files[] = EnvironmentDetector::getAhFilesRoot() . "/$site_name/secrets.settings.php";
}
In some cases (https://support-acquia.force.com/s/article/360049944713-How-to-override-the-default-MySQL-wait-timeout-setting for example), we need to place a setting before the Acquia Cloud settings are loaded.
On project using BLT, the good practice is to not change the sites/default/settings.php file generated by BLT and to use the files automatically loaded by
blt.settings.php
instead.Following the good practice, it is currently not possible to do anything before Acquia Cloud settings are loaded