diff --git a/core/authorize.php b/core/authorize.php index 7e85e95..d814ba3 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -80,9 +80,9 @@ function authorize_access_allowed() { // display errors via the maintenance theme. $module_list['system']['filename'] = 'core/modules/system/system.module'; $module_list['user']['filename'] = 'core/modules/user/user.module'; -drupal_extension_handler()->setModuleList($module_list); -drupal_extension_handler()->load('system'); -drupal_extension_handler()->load('user'); +drupal_container()->get('extension_handler')->setModuleList($module_list); +drupal_container()->get('extension_handler')->load('system'); +drupal_container()->get('extension_handler')->load('user'); // Initialize the language system. drupal_language_initialize(); diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 2b293b6..d1d058f 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -888,7 +888,7 @@ function drupal_get_filename($type, $name, $filename = NULL) { else { if ($type == 'module') { if (empty($files[$type])) { - $files[$type] = drupal_extension_handler()->getModuleList(); + $files[$type] = drupal_container()->get('extension_handler')->getModuleList(); } if (isset($files[$type][$name])) { return $files[$type][$name]; @@ -1125,7 +1125,7 @@ function drupal_page_is_cacheable($allow_caching = NULL) { * @see bootstrap_hooks() */ function bootstrap_invoke_all($hook) { - $extension_handler = drupal_extension_handler(); + $extension_handler = drupal_container()->get('extension_handler'); foreach ($extension_handler->getBootstrapModules() as $module) { $extension_handler->load($module); module_invoke($module, $hook); @@ -1147,7 +1147,7 @@ function bootstrap_invoke_all($hook) { */ function drupal_load($type, $name) { if ($type == 'module') { - return drupal_extension_handler()->load($name); + return drupal_container()->get('extension_handler')->load($name); } // Once a file is included this can't be reversed during a request so do not @@ -2425,29 +2425,6 @@ function drupal_container(Container $new_container = NULL) { return $container; } -/** - * Retrieves the ExtensionHandler that manages the list of enabled modules. - * - * This function instantiates a new ExtensionHandlerMinimal if there is no - * 'extension_handler' service in the container. This is currently needed for - * running tests. - * @todo Figure out how to get tests to run without using this. - * - * @return Drupal\Core\ExtensionHandlerInterface - */ -function drupal_extension_handler() { - $extension_handler = &drupal_static(__FUNCTION__, NULL); - if (isset($extension_handler)) { - return $extension_handler; - } - if (drupal_container()->has('extension_handler')) { - $extension_handler = drupal_container()->get('extension_handler'); - } - else { - $extension_handler = new ExtensionHandlerMinimal(); - } - return $extension_handler; -} /** * Loads all the modules that have been enabled in the system table. @@ -2455,7 +2432,7 @@ function drupal_extension_handler() { * @see ExtensionHandler::loadAll(). */ function module_load_all($bootstrap = FALSE, $reset = FALSE, $loaded = FALSE) { - return drupal_extension_handler()->loadAll($bootstrap, $reset, $loaded); + return drupal_container()->get('extension_handler')->loadAll($bootstrap, $reset, $loaded); } /** @@ -2464,7 +2441,7 @@ function module_load_all($bootstrap = FALSE, $reset = FALSE, $loaded = FALSE) { * @see ExtensionHandler::moduleImplements(). */ function module_implements($hook) { - return drupal_extension_handler()->moduleImplements($hook); + return drupal_container()->get('extension_handler')->moduleImplements($hook); } /** @@ -2476,7 +2453,7 @@ function module_invoke_all($hook) { $args = func_get_args(); // Remove $hook from the arguments. unset($args[0]); - return drupal_extension_handler()->moduleInvokeAll($hook, $args); + return drupal_container()->get('extension_handler')->moduleInvokeAll($hook, $args); } /** @@ -2485,7 +2462,7 @@ function module_invoke_all($hook) { * @see ExtensionHandler::alter(). */ function drupal_alter($type, &$data, &$context1 = NULL, &$context2 = NULL) { - return drupal_extension_handler()->alter($type, $data, $context1, $context2); + return drupal_container()->get('extension_handler')->alter($type, $data, $context1, $context2); } /** @@ -2494,7 +2471,7 @@ function drupal_alter($type, &$data, &$context1 = NULL, &$context2 = NULL) { * @see ExtensionHandler::moduleExists(). */ function module_exists($module) { - return drupal_extension_handler()->moduleExists($module); + return drupal_container()->get('extension_handler')->moduleExists($module); } /** diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 0369c01..c656f7d 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -342,8 +342,8 @@ function install_begin_request(&$install_state) { require_once DRUPAL_ROOT . '/core/includes/ajax.inc'; // Override the module list with a minimal set of modules. - drupal_extension_handler()->setModuleList(array('system' => 'core/modules/system/system.module')); - drupal_extension_handler()->load('system'); + drupal_container()->get('extension_handler')->setModuleList(array('system' => 'core/modules/system/system.module')); + drupal_container()->get('extension_handler')->load('system'); // Load the cache infrastructure using a "fake" cache implementation that // does not attempt to write to the database. We need this during the initial diff --git a/core/includes/install.inc b/core/includes/install.inc index 044b94c..9f44b00 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -445,7 +445,7 @@ function drupal_install_system() { // Clear out module list and hook implementation statics. drupal_static_reset('drupal_extension_handler'); - drupal_extension_handler()->setModuleList(array('system' => $system_path . '/system.module')); + drupal_container()->get('extension_handler')->setModuleList(array('system' => $system_path . '/system.module')); config_install_default_config('module', 'system'); module_invoke('system', 'install'); diff --git a/core/includes/module.inc b/core/includes/module.inc index 98627c7..f048418 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -283,7 +283,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { $schema_store = drupal_container()->get('keyvalue')->get('system.schema'); $module_config = config('system.module'); $disabled_config = config('system.module.disabled'); - $extension_handler = drupal_extension_handler(); + $extension_handler = drupal_container()->get('extension_handler'); foreach ($module_list as $module) { $module_filenames = $extension_handler->getModuleList(); // Only process modules that are not already enabled. @@ -436,7 +436,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { $module_config = config('system.module'); $disabled_config = config('system.module.disabled'); - $extension_handler = drupal_extension_handler(); + $extension_handler = drupal_container()->get('extension_handler'); foreach ($module_list as $module) { $enabled = $extension_handler->getModuleList(); if (isset($enabled[$module])) { @@ -457,7 +457,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { if (!empty($invoke_modules)) { // Refresh the module list to exclude the disabled modules. - drupal_extension_handler()->moduleImplementsReset(); + drupal_container()->get('extension_handler')->moduleImplementsReset(); entity_info_cache_clear(); // Invoke hook_modules_disabled before disabling modules, // so we can still call module hooks to get information. @@ -591,7 +591,7 @@ function module_hook($module, $hook) { } // If the hook implementation does not exist, check whether it may live in an // optional include file registered via hook_hook_info(). - $hook_info = drupal_extension_handler()->moduleHookInfo(); + $hook_info = drupal_container()->get('extension_handler')->moduleHookInfo(); if (isset($hook_info[$hook]['group'])) { module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']); if (function_exists($function)) { @@ -660,7 +660,7 @@ function drupal_required_modules() { function module_set_weight($module, $weight) { // Update the module weight in the config file that contains it. $module_config = config('system.module'); - $extension_handler = drupal_extension_handler(); + $extension_handler = drupal_container()->get('extension_handler'); $enabled_modules = $extension_handler->getModuleList(); if ($module_config->get("enabled.$module") !== NULL) { $module_config diff --git a/core/includes/schema.inc b/core/includes/schema.inc index ac610e1..4cf91ea 100644 --- a/core/includes/schema.inc +++ b/core/includes/schema.inc @@ -85,7 +85,7 @@ function drupal_get_complete_schema($rebuild = FALSE) { // that it contains the complete list of modules before we go on to call // module_load_all_includes(). system_list_reset(); - drupal_extension_handler()->loadAllIncludes('install'); + drupal_container()->get('extension_handler')->loadAllIncludes('install'); } require_once DRUPAL_ROOT . '/core/includes/common.inc'; @@ -130,7 +130,7 @@ function drupal_get_schema_versions($module) { $updates = &drupal_static(__FUNCTION__, NULL); if (!isset($updates[$module])) { $updates = array(); - foreach (drupal_extension_handler()->getModuleList() as $loaded_module => $filename) { + foreach (drupal_container()->get('extension_handler')->getModuleList() as $loaded_module => $filename) { $updates[$loaded_module] = array(); } diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 4184664..cd7b6b8 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -546,7 +546,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { // Add all modules so they can intervene with their own variable // processors. This allows them to provide variable processors even // if they are not the owner of the current hook. - $prefixes += array_keys(drupal_extension_handler()->getModuleList()); + $prefixes += array_keys(drupal_container()->get('extension_handler')->getModuleList()); } elseif ($type == 'theme_engine' || $type == 'base_theme_engine') { // Theme engines get an extra set that come before the normally diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index 88c893b..376caf6 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -56,8 +56,8 @@ function _drupal_maintenance_theme() { // Ensure that system.module is loaded. if (!function_exists('_system_rebuild_theme_data')) { $module_list['system']['filename'] = 'core/modules/system/system.module'; - drupal_extension_handler()->setModuleList($module_list); - drupal_extension_handler()->load('system'); + drupal_container()->get('extension_handler')->setModuleList($module_list); + drupal_container()->get('extension_handler')->load('system'); } $themes = list_themes(); diff --git a/core/includes/update.inc b/core/includes/update.inc index 17183cc..6ad80ef 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -126,9 +126,9 @@ function update_prepare_d8_bootstrap() { include_once DRUPAL_ROOT . '/core/includes/module.inc'; include_once DRUPAL_ROOT . '/core/includes/cache.inc'; - drupal_extension_handler()->setModuleList(array('system' => 'core/modules/system/system.module')); + drupal_container()->get('extension_handler')->setModuleList(array('system' => 'core/modules/system/system.module')); - drupal_extension_handler()->load('system'); + drupal_container()->get('extension_handler')->load('system'); // Ensure the configuration directories exist and are writable, or create // them. If the directories have not been specified in settings.php and // created manually already, and either directory cannot be created by the @@ -242,7 +242,7 @@ function update_prepare_d8_bootstrap() { // Populate a fixed module list (again, why did it get lost?) to avoid // errors due to the drupal_alter() in _system_rebuild_module_data(). $module_list['system'] = 'core/modules/system/system.module'; - drupal_extension_handler()->setModuleList($module_list); + drupal_container()->get('extension_handler')->setModuleList($module_list); $module_data = _system_rebuild_module_data(); // Migrate each extension into configuration, varying by the extension's @@ -273,7 +273,7 @@ function update_prepare_d8_bootstrap() { $sorted_with_filenames[$m] = drupal_get_filename('module', $m); } - drupal_extension_handler()->setModuleList($sorted_with_filenames); + drupal_container()->get('extension_handler')->setModuleList($sorted_with_filenames); $disabled_modules->save(); $theme_config->save(); $disabled_themes->save(); diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php index e61a54c..7d37285 100644 --- a/core/lib/Drupal/Core/CoreBundle.php +++ b/core/lib/Drupal/Core/CoreBundle.php @@ -34,6 +34,7 @@ class CoreBundle extends Bundle { */ public function build(ContainerBuilder $container) { + $container->setParameter('extension_handler.class', 'Drupal\Core\ExtensionHandler'); // Register active configuration storage. $container ->register('config.cachedstorage.storage', 'Drupal\Core\Config\FileStorage') @@ -113,7 +114,7 @@ public function build(ContainerBuilder $container) { // The ExtensionHandler manages enabled modules and provides the ability to // invoke hooks in all enabled modules. - $container->register('extension_handler', 'Drupal\Core\ExtensionHandler') + $container->register('extension_handler', '%extension_handler.class%') ->addArgument('%container.modules%') ->addArgument(new Reference('keyvalue')) ->addArgument(new Reference('cache.cache')) diff --git a/core/modules/breakpoint/breakpoint.install b/core/modules/breakpoint/breakpoint.install index dc507d6..9fd1054 100644 --- a/core/modules/breakpoint/breakpoint.install +++ b/core/modules/breakpoint/breakpoint.install @@ -18,5 +18,5 @@ function breakpoint_enable() { _breakpoint_theme_enabled(array_keys($themes)); // Import breakpoints from modules. - _breakpoint_modules_enabled(array_keys(drupal_extension_handler()->getModuleList())); + _breakpoint_modules_enabled(array_keys(drupal_container()->get('extension_handler')->getModuleList())); } diff --git a/core/modules/field/field.module b/core/modules/field/field.module index 6be1f0f..3059316 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -504,7 +504,7 @@ function field_modules_disabled($modules) { function field_sync_field_status() { // Refresh the 'active' and 'storage_active' columns according to the current // set of enabled modules. - $modules = array_keys(drupal_extension_handler()->getModuleList()); + $modules = array_keys(drupal_container()->get('extension_handler')->getModuleList()); foreach ($modules as $module_name) { field_associate_fields($module_name); } diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php b/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php index b9feaa0..c5de29e 100644 --- a/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php +++ b/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php @@ -61,7 +61,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { // Add all modules as possible layout providers. // @todo Change this class so that it gets the extension handler injected // into it. - foreach (drupal_extension_handler()->getModuleList() as $module => $filename) { + foreach (drupal_container()->get('extension_handler')->getModuleList() as $module => $filename) { $available_layout_providers[$module] = array( 'type' => 'module', 'provider' => $module, diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php index 263c0c2..d68c4ca 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php @@ -154,9 +154,6 @@ public function containerBuild($container) { ->register('keyvalue', 'Drupal\Core\KeyValueStore\KeyValueFactory') ->addArgument(new Reference('service_container')); } - // Register an extension handler for managing enabled modules. - $container - ->register('extension_handler', 'Drupal\Core\ExtensionHandlerMinimal'); } /** diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php index 38712d4..fe25549 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php @@ -39,7 +39,7 @@ function testSetUp() { // Verify that specified $modules have been loaded. $this->assertTrue(function_exists('entity_test_permission'), "$module.module was loaded."); // Verify that there is a fixed module list. - $this->assertIdentical(array_keys(drupal_extension_handler()->getModuleList()), array($module)); + $this->assertIdentical(array_keys(drupal_container()->get('extension_handler')->getModuleList()), array($module)); $this->assertIdentical(module_implements('permission'), array($module)); // Verify that no modules have been installed. @@ -54,7 +54,7 @@ function testEnableModulesLoad() { // Verify that the module does not exist yet. $this->assertFalse(module_exists($module), "$module module not found."); - $list = array_keys(drupal_extension_handler()->getModuleList()); + $list = array_keys(drupal_container()->get('extension_handler')->getModuleList()); $this->assertFalse(in_array($module, $list), "$module module not found in the extension handler's module list."); $list = module_implements('permission'); $this->assertFalse(in_array($module, $list), "{$module}_permission() in module_implements() not found."); @@ -64,7 +64,7 @@ function testEnableModulesLoad() { // Verify that the module exists. $this->assertTrue(module_exists($module), "$module module found."); - $list = array_keys(drupal_extension_handler()->getModuleList()); + $list = array_keys(drupal_container()->get('extension_handler')->getModuleList()); $this->assertTrue(in_array($module, $list), "$module module found in the extension handler's module list."); $list = module_implements('permission'); $this->assertTrue(in_array($module, $list), "{$module}_permission() in module_implements() found."); @@ -83,7 +83,7 @@ function testEnableModulesInstall() { // Verify that the module does not exist yet. $this->assertFalse(module_exists($module), "$module module not found."); - $list = array_keys(drupal_extension_handler()->getModuleList()); + $list = array_keys(drupal_container()->get('extension_handler')->getModuleList()); $this->assertFalse(in_array($module, $list), "$module module not found in the extension handler's module list."); $list = module_implements('permission'); $this->assertFalse(in_array($module, $list), "{$module}_permission() in module_implements() not found."); @@ -97,7 +97,7 @@ function testEnableModulesInstall() { // Verify that the enabled module exists. $this->assertTrue(module_exists($module), "$module module found."); - $list = array_keys(drupal_extension_handler()->getModuleList()); + $list = array_keys(drupal_container()->get('extension_handler')->getModuleList()); $this->assertTrue(in_array($module, $list), "$module module found in the extension handler's module list."); $list = module_implements('permission'); $this->assertTrue(in_array($module, $list), "{$module}_permission() in module_implements() found."); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index a42cee0..5390457 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -723,6 +723,7 @@ protected function setUp() { foreach ($variables as $name => $value) { $GLOBALS['conf'][$name] = $value; } + // Execute the non-interactive installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; install_drupal($settings); diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php index 25b97db..d130a7f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php @@ -104,7 +104,7 @@ function testModuleImplements() { module_load_include('inc', 'module_test', 'module_test.file'); $modules = module_implements('test_hook'); $this->assertTrue(in_array('module_test', $modules), 'Hook found.'); - $module_implementations = drupal_extension_handler()->cachedHookImplementations(); + $module_implementations = drupal_container()->get('extension_handler')->cachedHookImplementations(); $this->assertEqual($module_implementations['test_hook']['module_test'], 'file', 'Include file detected.'); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php index ce55402..7034c01 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php @@ -37,7 +37,7 @@ public function testDisabledUpgrade() { $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); // Get enabled modules. - $enabled = drupal_extension_handler()->getModuleList(); + $enabled = drupal_container()->get('extension_handler')->getModuleList(); // Get all available modules. $available = system_rebuild_module_data(); // Filter out hidden test modules. diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index bb6b210..495db37 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -1204,7 +1204,7 @@ function system_modules_submit($form, &$form_state) { // Gets list of modules prior to install process, unsets $form_state['storage'] // so we don't get redirected back to the confirmation form. - $pre_install_list = drupal_extension_handler()->getModuleList(); + $pre_install_list = drupal_container()->get('extension_handler')->getModuleList(); unset($form_state['storage']); // Reverse the 'enable' list, to order dependencies before dependents. @@ -1216,7 +1216,7 @@ function system_modules_submit($form, &$form_state) { // Gets module list after install process, flushes caches and displays a // message if there are changes. - $post_install_list = drupal_extension_handler()->getModuleList(); + $post_install_list = drupal_container()->get('extension_handler')->getModuleList(); if ($pre_install_list != $post_install_list) { drupal_flush_all_caches(); drupal_set_message(t('The configuration options have been saved.')); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index cc700ab..119d8b3 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -400,7 +400,7 @@ function system_requirements($phase) { ); // Check installed modules. - foreach (drupal_extension_handler()->getModuleList() as $module => $filename) { + foreach (drupal_container()->get('extension_handler')->getModuleList() as $module => $filename) { $updates = drupal_get_schema_versions($module); if ($updates !== FALSE) { $default = drupal_get_installed_schema_version($module); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 8fb0db1..bef3ed7 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2699,7 +2699,7 @@ function system_get_info($type, $name = NULL) { $info = array(); if ($type == 'module') { $data = system_rebuild_module_data(); - foreach (drupal_extension_handler()->getModuleList() as $module => $filename) { + foreach (drupal_container()->get('extension_handler')->getModuleList() as $module => $filename) { $info[$module] = $data[$module]->info; } } @@ -2842,7 +2842,7 @@ function system_rebuild_module_data() { $record->schema_version = SCHEMA_UNINSTALLED; $files[$module] = $record->filename; } - $modules = drupal_extension_handler()->buildModuleDependencies($modules); + $modules = drupal_container()->get('extension_handler')->buildModuleDependencies($modules); $modules_cache = $modules; // Store filenames to allow system_list() and drupal_get_filename() to diff --git a/core/scripts/dump-database-d6.sh b/core/scripts/dump-database-d6.sh index dd9eb09..18453e6 100644 --- a/core/scripts/dump-database-d6.sh +++ b/core/scripts/dump-database-d6.sh @@ -44,7 +44,7 @@ ENDOFHEADER; -foreach (drupal_extension_handler()->getModuleList() as $module => $filename) { +foreach (drupal_container()->get('extension_handler')->getModuleList() as $module => $filename) { $output .= " * - $module\n"; } $output .= " */\n\n"; diff --git a/core/scripts/dump-database-d7.sh b/core/scripts/dump-database-d7.sh index 9995fe8..8489520 100644 --- a/core/scripts/dump-database-d7.sh +++ b/core/scripts/dump-database-d7.sh @@ -45,7 +45,7 @@ ENDOFHEADER; -foreach (drupal_extension_handler()->getModuleList() as $module => $filename) { +foreach (drupal_container()->get('extension_handler')->getModuleList() as $module => $filename) { $output .= " * - $module\n"; } $output .= " */\n\n"; diff --git a/core/update.php b/core/update.php index df4cd1a..7491fb4 100644 --- a/core/update.php +++ b/core/update.php @@ -436,7 +436,7 @@ function update_check_requirements($skip_warnings = FALSE) { // Load module basics. include_once DRUPAL_ROOT . '/core/includes/module.inc'; $module_list['system'] = 'core/modules/system/system.module'; - $extension_handler = drupal_extension_handler(); + $extension_handler = drupal_container()->get('extension_handler'); $extension_handler->setModuleList($module_list); $extension_handler->load('system');