diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index fe43d8647a4e96dcd977347953941b068ee6297d..d3b7b1bbe1f46227624afdd630c34c345c629308 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -72,15 +72,6 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { */ protected $moduleList; - /** - * Holds an updated list of enabled modules. - * - * @var array - * An associative array whose keys are module names and whose values are - * ignored. - */ - protected $newModuleList; - /** * List of available modules and installation profiles. * @@ -351,7 +342,7 @@ protected function moduleData($module) { * needed. */ public function updateModules(array $module_list, array $module_filenames = array()) { - $this->newModuleList = $module_list; + $this->moduleList = $module_list; foreach ($module_filenames as $name => $extension) { $this->moduleData[$name] = $extension; } @@ -426,14 +417,6 @@ protected function initializeContainer() { $this->persistServices($persist); } } - // First check whether the list of modules changed in this request. - if (isset($this->newModuleList)) { - if (isset($this->container) && isset($this->moduleList) && array_keys($this->moduleList) !== array_keys($this->newModuleList)) { - unset($this->container); - } - $this->moduleList = $this->newModuleList; - unset($this->newModuleList); - } if (isset($this->container)) { // All namespaces must be registered before we attempt to use any service // from the container.