|
84 | 84 | */
|
85 | 85 | // phpcs:ignore
|
86 | 86 | $site_name = EnvironmentDetector::getSiteName($site_path);
|
| 87 | + |
87 | 88 | // Acquia Cloud settings.
|
88 | 89 | if (EnvironmentDetector::isAhEnv()) {
|
89 | 90 | try {
|
| 91 | + // Acquia platform settings includes a require line |
| 92 | + // that opens database connection, hence the mysql57 settings |
| 93 | + // file should be added before platform require line. |
| 94 | + // @see: https://www.drupal.org/project/mysql57 |
| 95 | + // @todo: Remove this line once acquia platform start supporting mysql 8.0 |
| 96 | + if(!EnvironmentDetector::isAhIdeEnv()) { |
| 97 | + $settings_files[] = __DIR__ . "/mysql57.settings.php"; |
| 98 | + } |
90 | 99 | if (!EnvironmentDetector::isAcsfEnv()) {
|
91 | 100 | $settings_files[] = FilePaths::ahSettingsFile(EnvironmentDetector::getAhGroup(), $site_name);
|
92 | 101 | }
|
| 102 | + // Acquia Cloud IDE settings have $databases variable defined hence |
| 103 | + // the mysql57 setting file should be added after platform require line. |
| 104 | + // @todo: Remove this line once acquia platform start supporting mysql 8.0 |
| 105 | + if(EnvironmentDetector::isAhIdeEnv()) { |
| 106 | + $settings_files[] = __DIR__ . "/mysql57.settings.php"; |
| 107 | + } |
93 | 108 | }
|
94 | 109 | catch (SettingsException $e) {
|
95 | 110 | trigger_error($e->getMessage(), E_USER_WARNING);
|
|
101 | 116 | $settings_files[] = EnvironmentDetector::getAhFilesRoot() . '/secrets.settings.php';
|
102 | 117 | $settings_files[] = EnvironmentDetector::getAhFilesRoot() . "/$site_name/secrets.settings.php";
|
103 | 118 | }
|
104 |
| - |
105 | 119 | // Default global settings.
|
106 | 120 | $acquia_settings_files = [
|
107 | 121 | 'cache',
|
|
0 commit comments