diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 9fd594a..d7eba77 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -78,14 +78,16 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * Holds the list of enabled modules. * * @var array - * An associative array whose keys are module names and whose values are - * ignored. + * An associative array whose keys are module names and whose values is the + * module weight. */ protected $moduleList; /** * List of available modules and installation profiles. * + * Its a list of extensions keyed by module name. + * * @var \Drupal\Core\Extension\Extension[] */ protected $moduleData = array(); @@ -637,10 +639,7 @@ protected function moduleData($module) { } /** - * Implements Drupal\Core\DrupalKernelInterface::updateModules(). - * - * @todo Remove obsolete $module_list parameter. Only $module_filenames is - * needed. + * {@inheritdoc} */ public function updateModules(array $module_list, array $module_filenames = array()) { $this->moduleList = $module_list; diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php index e7c468f..1ec8fa1 100644 --- a/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -87,7 +87,7 @@ public function getAppRoot(); * list. * * @param array $module_list - * The new list of modules. + * The list of module weights, keyed by module name. * @param array $module_filenames * List of module filenames, keyed by module name. */ diff --git a/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php index 8d96767..d7d4b5c 100644 --- a/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php @@ -26,7 +26,7 @@ class PathRootsSubscriber implements EventSubscriberInterface { * * @var array */ - protected $pathRoots; + protected $pathRoots = []; /** * The state key value store. diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php index c6f3921..5632afd 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -188,7 +188,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { drupal_static_reset('system_rebuild_module_data'); // Update the kernel to include it. - $this->updateKernel($module_filenames); + $this->updateKernel($extension_config->get('module'), $module_filenames); // Refresh the schema to include it. drupal_get_schema(NULL, TRUE); @@ -403,7 +403,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { \Drupal::service('router.builder_indicator')->setRebuildNeeded(); // Update the kernel to exclude the uninstalled modules. - $this->updateKernel($module_filenames); + $this->updateKernel($extension_config->get('module'), $module_filenames); // Update the theme registry to remove the newly uninstalled module. drupal_theme_rebuild(); @@ -480,12 +480,12 @@ protected function removeCacheBins($module) { * @param string $module_filenames * The list of installed modules. */ - protected function updateKernel($module_filenames) { + protected function updateKernel($module_list, $module_filenames) { // This reboots the kernel to register the module's bundle and its services // in the service container. The $module_filenames argument is taken over as // %container.modules% parameter, which is passed to a fresh ModuleHandler // instance upon first retrieval. - $this->kernel->updateModules($module_filenames, $module_filenames); + $this->kernel->updateModules($module_list, $module_filenames); // After rebuilding the container we need to update the injected // dependencies. $container = $this->kernel->getContainer();