diff --git a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php index 56de365..6a69082 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php @@ -117,7 +117,9 @@ protected function validateModules(ConfigImporter $config_importer) { } } - $install_profile = $this->drupalGetProfile(); + // Settings is safe to use because settings.php is written before any module + // is installed. + $install_profile = Settings::get('install_profile'); // Ensure that all modules being uninstalled are not required by modules // that will be installed after the import. $uninstalls = $config_importer->getExtensionChangelist('module', 'uninstall'); @@ -327,18 +329,4 @@ protected function getNames(array $names, array $extension_data) { }, $names); } - /** - * Gets the install profile from settings. - * - * @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() { - // Settings is safe to use because settings.php is written before any module - // is installed. - return Settings::get('install_profile'); - } - }