diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index 6900071..075b656 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -411,7 +411,7 @@ public function checkConfigurationToInstall($type, $name) { // Install profiles can not have config clashes. Configuration that // has the same name as a module's configuration will be used instead. - if ($name != Settings::get('install_profile')) { + if ($name != $this->drupalGetProfile()) { // Validate default configuration of this module. Bail if unable to // install. Should not continue installing more modules because those // may depend on this one. @@ -546,4 +546,16 @@ protected function drupalGetPath($type, $name) { return drupal_get_path($type, $name); } + /** + * Wrapper for drupal_get_profile(). + * + * @return string|null $profile + * The name of the installation profile or NULL if no installation profile is + * currently active. This is the case for example during the first steps of + * the installer or during unit tests. + */ + protected function drupalGetProfile() { + return drupal_get_profile(); + } + }