|
85 | 85 | // phpcs:ignore
|
86 | 86 | $site_name = EnvironmentDetector::getSiteName($site_path);
|
87 | 87 |
|
88 |
| -// Acquia Cloud settings. |
| 88 | +// Acquia platform settings includes a require line that |
| 89 | +// opens database connection, hence the mysql57 settings |
| 90 | +// file should be added before platform require line. |
| 91 | +// @see: https://www.drupal.org/project/mysql57 |
| 92 | +// @todo: Remove this line once acquia platform start supporting mysql 8.0 |
| 93 | +if(!EnvironmentDetector::isAhIdeEnv()) { |
| 94 | + $settings_files[] = __DIR__ . "/mysql57.settings.php"; |
| 95 | +} |
| 96 | + |
| 97 | +// Acquia Cloud settings |
89 | 98 | if (EnvironmentDetector::isAhEnv()) {
|
90 | 99 | try {
|
91 |
| - // Acquia cloud expects mysql57 settings file |
92 |
| - // to be included before any settings. |
93 |
| - // Though Cloud IDE expect it to be included after db settings. |
94 |
| - // @todo: Remove this line once acquia platform start supporting myslql 8.0 |
95 |
| - if(!EnvironmentDetector::isAhIdeEnv()) { |
96 |
| - $settings_files[] = __DIR__ . "/mysql57.settings.php"; |
97 |
| - } |
98 | 100 | if (!EnvironmentDetector::isAcsfEnv()) {
|
99 | 101 | $settings_files[] = FilePaths::ahSettingsFile(EnvironmentDetector::getAhGroup(), $site_name);
|
100 | 102 | }
|
| 103 | + // Acquia Cloud IDE settings have $databases variable defined hence |
| 104 | + // the mysql57 setting file should be added after platform require line. |
| 105 | + // @todo: Remove this line once acquia platform start supporting mysql 8.0 |
| 106 | + if(EnvironmentDetector::isAhIdeEnv()) { |
| 107 | + $settings_files[] = __DIR__ . "/mysql57.settings.php"; |
| 108 | + } |
101 | 109 | }
|
102 | 110 | catch (SettingsException $e) {
|
103 | 111 | trigger_error($e->getMessage(), E_USER_WARNING);
|
|
117 | 125 | 'filesystem',
|
118 | 126 | 'misc',
|
119 | 127 | ];
|
120 |
| -// Cloud IDE expect mysql57 driver to be included after db settings. |
121 |
| -if(EnvironmentDetector::isAhIdeEnv()) { |
122 |
| - $acquia_settings_files[] = 'mysql57'; |
123 |
| -} |
124 |
| - |
125 | 128 | foreach ($acquia_settings_files as $recommended_settings_file) {
|
126 | 129 | $settings_files[] = __DIR__ . "/$recommended_settings_file.settings.php";
|
127 | 130 | }
|
|
0 commit comments