Commit c711a457 authored by alexpott's avatar alexpott

Issue #2277445 by znerol: Remove newModuleList instance variable from...

Issue #2277445 by znerol: Remove newModuleList instance variable from DrupalKernel and related check in initializeContainer.
parent 6bf9738a
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment