diff --git a/core/lib/Drupal/Core/Update/UpdateKernel.php b/core/lib/Drupal/Core/Update/UpdateKernel.php index 4005af7..80f243c 100755 --- a/core/lib/Drupal/Core/Update/UpdateKernel.php +++ b/core/lib/Drupal/Core/Update/UpdateKernel.php @@ -39,7 +39,8 @@ public function discoverServiceProviders() { * {@inheritdoc} */ protected function initializeContainer() { - // Always force a container rebuild. + // Always force a container rebuild, in order to be able to override some + // services, see \Drupal\Core\Update\UpdateServiceProvider. $this->containerNeedsRebuild = TRUE; $container = parent::initializeContainer(); return $container; @@ -49,7 +50,8 @@ protected function initializeContainer() { * {@inheritdoc} */ protected function cacheDrupalContainer(array $container_definition) { - // Don't save this particular container to cache. + // Don't save this particular container to cache, so it does not leak into + // the main site at all. return FALSE; } diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 935a067..fa8104d 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -186,9 +186,6 @@ public function handle($op, Request $request) { } $title = isset($output['#title']) ? $output['#title'] : $this->t('Drupal database update'); - // Ensure that at least the drupalSettings js is loaded. - $output['#attached']['library'][] = 'core/drupalSettings'; - return $this->bareHtmlPageRenderer->renderBarePage($output, $title, 'maintenance_page', $regions); } diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php index e666afe..cd6d790 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php @@ -236,9 +236,9 @@ protected function runUpdates() { ]]]); $this->drupalGet($this->updateUrl); - $this->doPreUpdateTests(); $this->clickLink(t('Continue')); + $this->doSelectionTest(); // Run the update hooks. $this->clickLink(t('Apply pending updates')); @@ -275,11 +275,12 @@ protected function replaceUser1() { } /** - * Tests update.php before tests are run. + * Tests the selection page. */ - protected function doPreUpdateTests() { - // No-op. Tests wishing to do tests at the update.php URL before updates are - // run can override this method and implement their required tests. + protected function doSelectionTest() { + // No-op. Tests wishing to do test the selection page or the general + //update.php environment before running update.php can override this + //method and implement their required tests. } } diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php index 0061890..cc6ba4c 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php @@ -35,7 +35,7 @@ public function testJavaScriptLoading() { /** * {@inheritdoc} */ - protected function doPreUpdateTests() { + protected function doSelectionTest() { // Ensure that at least one JS script has drupalSettings in there. $scripts = $this->xpath('//script'); $found = FALSE;