diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 03df556..eb558c2 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -350,10 +350,8 @@ function install_begin_request(&$install_state) { drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES); _drupal_bootstrap_code(); } - else { - drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE); - } $kernel = new DrupalKernel('prod', TRUE, drupal_classloader(), FALSE); + $kernel->setBootstrapPhase($install_state['parameters']['bootstrap']); $kernel->boot(); // We are anonymous until we reach install_configure_form_submit(). @@ -923,7 +921,8 @@ function install_system_rebuild(&$install_state) { // @see install_begin_request() drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES); _drupal_bootstrap_code(); - $kernel = new DrupalKernel('prod', TRUE, drupal_classloader()); + $kernel = new DrupalKernel('prod', TRUE, drupal_classloader(), FALSE); + $kernel->setBootstrapPhase(DRUPAL_BOOTSTRAP_VARIABLES); $kernel->boot(); $install_state['base_system_verified'] = TRUE; diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index a5624d7..ac23479 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -114,6 +114,16 @@ class DrupalKernel extends Kernel implements DrupalKernelInterface { protected $containerNeedsDumping; /** + * The bootstrap phase to boot to. + * + * @todo Remove after converting session handling to a service. + * @see install_begin_request() + * + * @var integer + */ + protected $bootstrapPhase = DRUPAL_BOOTSTRAP_CODE; + + /** * Constructs a DrupalKernel object. * * @param string $environment @@ -150,6 +160,16 @@ public function init() { } /** + * Sets the bootstrap phase to boot to. + * + * @todo Remove after converting session handling to a service. + * @see install_begin_request() + */ + public function setBootstrapPhase($phase) { + $this->bootstrapPhase = $phase; + } + + /** * Overrides Kernel::boot(). */ public function boot() { @@ -160,7 +180,7 @@ public function boot() { $this->booted = TRUE; // @todo Remove this once everything in the bootstrap has been converted to // services in the DIC. - drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE); + drupal_bootstrap($this->bootstrapPhase); // Now that full bootstrap is complete, we can dump the container if it // was just rebuilt. if ($this->containerNeedsDumping && !$this->dumpDrupalContainer($this->container, $this->getContainerBaseClass())) {