diff -u b/core/includes/install.core.inc b/core/includes/install.core.inc --- b/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -152,6 +152,9 @@ // Redirect to the correct page if the URL parameters have changed. install_goto(install_redirect_url($state)); } + elseif ($output instanceof Response) { + $output->send(); + } elseif (isset($output)) { // Display a page only if some output is available. Otherwise it is // possible that we are printing a JSON page and theme output should @@ -671,14 +674,8 @@ // any output from the batch process, until the task is complete. elseif ($current_batch == $function) { $output = _batch_page(\Drupal::request()); - // Because Batch API now returns a JSON response for intermediary steps, - // but the installer doesn't handle Response objects yet, just send the - // output here and emulate the old model. - // @todo Replace this when we refactor the installer to use a request- - // response workflow. if ($output instanceof Response) { - $output->send(); - $output = NULL; + return $output; } // The task is complete when we try to access the batch page and receive // FALSE in return, since this means we are at a URL where we are no @@ -1547,8 +1544,6 @@ $session = \Drupal::service('session'); \Drupal::request()->setSession($session); $session->start(); - // Ensure the session is maintained throughout the install. - $session->set('_drupal_installing', TRUE); } /** @@ -1846,9 +1841,6 @@ // Installation profiles are always loaded last. module_set_weight($profile, 1000); - // Clean up the session flag. - \Drupal::service('session')->remove('_drupal_installing'); - // Build the router once after installing all modules. // This would normally happen upon KernelEvents::TERMINATE, but since the // installer does not use an HttpKernel, that event is never triggered.