diff -u b/core/includes/common.inc b/core/includes/common.inc --- b/core/includes/common.inc +++ b/core/includes/common.inc @@ -4575,7 +4575,7 @@ require_once DRUPAL_ROOT . '/core/includes/entity.inc'; // Load all enabled modules - drupal_container()->get('module_handler')->loadAll(); + Drupal::moduleHandler()->loadAll(); // Make sure all stream wrappers are registered. file_get_stream_wrappers(); @@ -4878,7 +4878,7 @@ require_once DRUPAL_ROOT . '/core/includes/entity.inc'; // Load all enabled modules - Drupal::moduleHandler()->loadAll(); + drupal_container()->get('module_handler')->loadAll(); // Make sure all stream wrappers are registered. file_get_stream_wrappers(); @@ -6089,7 +6089,7 @@ // Ensure that all modules that are currently supposed to be enabled are // actually loaded. - drupal_container()->get('module_handler')->loadAll(); + Drupal::moduleHandler()->loadAll(); // Update the list of bootstrap modules. // Allows developers to get new bootstrap hooks implementations registered @@ -6392,7 +6392,7 @@ // Ensure that all modules that are currently supposed to be enabled are // actually loaded. - Drupal::moduleHandler()->loadAll(); + drupal_container()->get('module_handler')->loadAll(); // Update the list of bootstrap modules. // Allows developers to get new bootstrap hooks implementations registered diff -u b/core/includes/module.inc b/core/includes/module.inc --- b/core/includes/module.inc +++ b/core/includes/module.inc @@ -663,7 +663,7 @@ // Prepare the new module list, sorted by weight, including filenames. // @see module_enable() - $module_handler = Drupal::moduleHandler(); + $module_handler = drupal_container()->get('module_handler'); $current_module_filenames = $module_handler->getModuleList(); $current_modules = array_fill_keys(array_keys($current_module_filenames), 0); $current_modules = module_config_sort(array_merge($current_modules, $module_config->get('enabled'))); @@ -694,7 +694,7 @@ // Prepare the new module list, sorted by weight, including filenames. // @see module_enable() - $module_handler = drupal_container()->get('module_handler'); + $module_handler = Drupal::moduleHandler(); $current_module_filenames = $module_handler->getModuleList(); $current_modules = array_fill_keys(array_keys($current_module_filenames), 0); $current_modules = module_config_sort(array_merge($current_modules, $module_config->get('enabled'))); diff -u b/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc --- b/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -56,7 +56,7 @@ // Ensure that system.module is loaded. if (!function_exists('_system_rebuild_theme_data')) { $module_list['system'] = 'core/modules/system/system.module'; - $module_handler = Drupal::moduleHandler(); + $module_handler = drupal_container()->get('module_handler'); $module_handler->setModuleList($module_list); $module_handler->load('system'); } @@ -66,7 +66,7 @@ // Ensure that system.module is loaded. if (!function_exists('_system_rebuild_theme_data')) { $module_list['system'] = 'core/modules/system/system.module'; - $module_handler = drupal_container()->get('module_handler'); + $module_handler = Drupal::moduleHandler(); $module_handler->setModuleList($module_list); $module_handler->load('system'); } reverted: --- b/core/modules/field/field.module +++ a/core/modules/field/field.module @@ -533,7 +533,7 @@ function field_sync_field_status() { // Refresh the 'active' and 'storage_active' columns according to the current // set of enabled modules. + $modules = array_keys(drupal_container()->get('module_handler')->getModuleList()); - $modules = array_keys(Drupal::moduleHandler()->getModuleList()); foreach ($modules as $module_name) { field_associate_fields($module_name); } diff -u b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php --- b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php +++ b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php @@ -123,14 +123,14 @@ return ($a->getWeight() < $b->getWeight()) ? -1 : 1; }); - \Drupal::moduleHandler()->alter('tour_tips', $tips, $this); + drupal_container()->get('module_handler')->alter('tour_tips', $tips, $this); return array_values($tips); } return ($a->getWeight() < $b->getWeight()) ? -1 : 1; }); - drupal_container()->get('module_handler')->alter('tour_tips', $tips, $this); + \Drupal::moduleHandler()->alter('tour_tips', $tips, $this); return array_values($tips); }