diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 179ca7f..78704f0 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -12,7 +12,6 @@ use Drupal\Core\Render\Markup; use Drupal\Component\Render\MarkupInterface; use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Site\Settings; use Drupal\Core\Utility\Error; use Drupal\Core\StringTranslation\TranslatableMarkup; diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 4062365..7a4dcbe 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1214,7 +1214,9 @@ function _install_select_profile(&$install_state) { return $distribution; } } - catch (TooManyDistributionsException $e) {} + catch (TooManyDistributionsException $e) { + // The user must choose. + } // Get all visible (not hidden) profiles. $visible_profiles = array_filter($install_state['profiles'], function ($profile) { @@ -2170,6 +2172,8 @@ function install_display_requirements($install_state, $requirements) { * * @param array $install_state * An array of information about the current installation state. + * + * @see _install_select_profile() */ function install_write_profile($install_state) { $settings_value = Settings::get('install_profile'); @@ -2183,7 +2187,9 @@ function install_write_profile($install_state) { try { $distribution = \Drupal::service('kernel')->getDistribution(); } - catch (TooManyDistributionsException $e) {} + catch (TooManyDistributionsException $e) { + // The user will have chosen. + } if ($settings_value == '' && $distribution && !is_writable(\Drupal::service('site.path') . '/settings.php')) { $need_to_write = FALSE; diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php index 99a7420..4f7e9c4 100644 --- a/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -139,4 +139,5 @@ public function preHandle(Request $request); * Helper method that loads legacy Drupal include files. */ public function loadLegacyIncludes(); + } diff --git a/core/lib/Drupal/Core/Installer/InstallerKernel.php b/core/lib/Drupal/Core/Installer/InstallerKernel.php index c149985..55e8af6 100644 --- a/core/lib/Drupal/Core/Installer/InstallerKernel.php +++ b/core/lib/Drupal/Core/Installer/InstallerKernel.php @@ -72,4 +72,5 @@ public function getInstallProfile() { public function getDistribution() { return parent::getDistribution(); } + } diff --git a/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php b/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php index 124e55f..83e68b9 100644 --- a/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php +++ b/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php @@ -28,7 +28,7 @@ protected function setUp() { $info = array( 'type' => 'profile', 'core' => \Drupal::CORE_COMPATIBILITY, - 'name' => $name .' profile', + 'name' => $name . ' profile', 'distribution' => array( 'name' => $name, 'install' => array(