From c711a457967c402cb56153c4e5909c2a43f63270 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sun, 8 Jun 2014 17:39:10 -0500
Subject: [PATCH] Issue #2277445 by znerol: Remove newModuleList instance
 variable from DrupalKernel and related check in initializeContainer.

---
 core/lib/Drupal/Core/DrupalKernel.php | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index fe43d8647a4e..d3b7b1bbe1f4 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.
-- 
GitLab