diff --git a/core/lib/Drupal/Core/Installer/InstallerKernel.php b/core/lib/Drupal/Core/Installer/InstallerKernel.php index 33c4380..3aadf34 100644 --- a/core/lib/Drupal/Core/Installer/InstallerKernel.php +++ b/core/lib/Drupal/Core/Installer/InstallerKernel.php @@ -165,7 +165,10 @@ protected function doRegisterServiceProviders($yaml_loader, $container) { * {@inheritdoc} */ public function terminate(Request $request, Response $response) { - if ($this->dumpOnTerminate) { + if ($this->dumpOnTerminate && $this->allowDumping) { + if ($this->container instanceof ContainerBuilder) { + $this->container->compile(); + } $this->dumpDrupalContainer($this->container, static::CONTAINER_BASE_CLASS, TRUE); } if (FALSE === $this->booted) { @@ -184,7 +187,8 @@ protected function doCompile($container) { if ($this->systemInstalled) { // Once system module is installed and InstallerServiceProvider has been // deactivated, we can progressively build the container. - $this->containerBuilder = clone $container; + $this->containerBuilder = $container; + return; } parent::doCompile($container); }