Skip to content
Snippets Groups Projects
Commit c711a457 authored by Alex Pott's avatar Alex Pott
Browse files

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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment