acquia / drupal-environment-detector

Provides common methods for detecting the current Acquia environment
GNU General Public License v2.0
10 stars 12 forks source link

Acquia Cloud does not support hyphens in db names #86

Open ssu-carlsoni opened 6 months ago

ssu-carlsoni commented 6 months ago

https://github.com/acquia/drupal-environment-detector/blob/782e2b921634dbe0e291192febd684eb1685151c/src/FilePaths.php#L30

ssu-carlsoni commented 6 months ago

While moving to Acquia Recommended Settings we had an issue with one of our multisites with a hyphen in the domain. Example: childrens-school.domain.edu

We addressed in the sites settings.php file via the following

// Acquia Recommended Settings - does not support hyphens in site names
if (EnvironmentDetector::isAhEnv()) {
  $site_settings_file = FilePaths::ahSettingsFile(EnvironmentDetector::getAhGroup(), 'childrens_school');
  if (file_exists($site_settings_file)) {
    require_once $site_settings_file;
  }
}

I think FilePaths::ahSettingsFile should be updated to support this configuration.