diff --git a/core/includes/module.inc b/core/includes/module.inc index bc50d2c1c96..d80d74bb191 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -186,7 +186,7 @@ function module_set_weight($module, $weight) { ->save(TRUE); // Prepare the new module list, sorted by weight, including filenames. - // @see \Drupal\Core\Extension\ModuleHandler::install() + // @see \Drupal\Core\Extension\ModuleInstaller::install() $module_handler = \Drupal::moduleHandler(); $current_module_filenames = $module_handler->getModuleList(); $current_modules = array_fill_keys(array_keys($current_module_filenames), 0); diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index b7323876303..74fc76699ea 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -175,7 +175,7 @@ function hook_module_preinstall($module) { * This function differs from hook_install() in that it gives all other modules * a chance to perform actions when a module is installed, whereas * hook_install() is only called on the module actually being installed. See - * \Drupal\Core\Extension\ModuleHandler::install() for a detailed description of + * \Drupal\Core\Extension\ModuleInstaller::install() for a detailed description of * the order in which install hooks are invoked. * * This hook should be implemented in a .module file, not in an .install file. @@ -183,7 +183,7 @@ function hook_module_preinstall($module) { * @param $modules * An array of the modules that were installed. * - * @see \Drupal\Core\Extension\ModuleHandler::install() + * @see \Drupal\Core\Extension\ModuleInstaller::install() * @see hook_install() */ function hook_modules_installed($modules) { @@ -223,7 +223,7 @@ function hook_modules_installed($modules) { * be removed during uninstall should be removed with hook_uninstall(). * * @see hook_schema() - * @see \Drupal\Core\Extension\ModuleHandler::install() + * @see \Drupal\Core\Extension\ModuleInstaller::install() * @see hook_uninstall() * @see hook_modules_installed() */ diff --git a/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php b/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php index 5603e4c90b9..1ace991de83 100644 --- a/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php +++ b/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php @@ -73,7 +73,7 @@ class InstallerServiceProvider implements ServiceProviderInterface, ServiceModif // No service may persist when the early installer kernel is rebooted into // the production environment. // @todo The DrupalKernel reboot performed by drupal_install_system() is - // actually not a "regular" reboot (like ModuleHandler::install()), so + // actually not a "regular" reboot (like ModuleInstaller::install()), so // services are not actually persisted. foreach ($container->findTaggedServiceIds('persist') as $id => $tags) { $definition = $container->getDefinition($id); diff --git a/core/modules/language/src/LanguageNegotiator.php b/core/modules/language/src/LanguageNegotiator.php index 3257567f8f7..2ae9032973a 100644 --- a/core/modules/language/src/LanguageNegotiator.php +++ b/core/modules/language/src/LanguageNegotiator.php @@ -276,8 +276,8 @@ class LanguageNegotiator implements LanguageNegotiatorInterface { */ function purgeConfiguration() { // Ensure that we are getting the defined language negotiation information. - // An invocation of \Drupal\Core\Extension\ModuleHandler::install() or - // \Drupal\Core\Extension\ModuleHandler::uninstall() could invalidate the + // An invocation of \Drupal\Core\Extension\ModuleInstaller::install() or + // \Drupal\Core\Extension\ModuleInstaller::uninstall() could invalidate the // cached information. $this->negotiatorManager->clearCachedDefinitions(); $this->languageManager->reset(); @@ -291,8 +291,8 @@ class LanguageNegotiator implements LanguageNegotiatorInterface { */ function updateConfiguration(array $types) { // Ensure that we are getting the defined language negotiation information. - // An invocation of \Drupal\Core\Extension\ModuleHandler::install() or - // \Drupal\Core\Extension\ModuleHandler::uninstall() could invalidate the + // An invocation of \Drupal\Core\Extension\ModuleInstaller::install() or + // \Drupal\Core\Extension\ModuleInstaller::uninstall() could invalidate the // cached information. $this->negotiatorManager->clearCachedDefinitions(); $this->languageManager->reset(); diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php index ff400e18ef5..8a3e98ed8ac 100644 --- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php @@ -115,7 +115,7 @@ class ModuleHandlerTest extends KernelTestBase { $this->pass(t('ModuleInstaller::install() throws an exception if dependencies are missing.')); } - $this->assertFalse($this->moduleHandler()->moduleExists('color'), 'ModuleHandler::install() aborts if dependencies are missing.'); + $this->assertFalse($this->moduleHandler()->moduleExists('color'), 'ModuleInstaller::install() aborts if dependencies are missing.'); // Fix the missing dependency. // Color module depends on Config. Config depends on Help module. @@ -123,7 +123,7 @@ class ModuleHandlerTest extends KernelTestBase { drupal_static_reset('system_rebuild_module_data'); $result = $this->moduleInstaller()->install(array('color')); - $this->assertTrue($result, 'ModuleHandler::install() returns the correct value.'); + $this->assertTrue($result, 'ModuleInstaller::install() returns the correct value.'); // Verify that the fake dependency chain was installed. $this->assertTrue($this->moduleHandler()->moduleExists('config') && $this->moduleHandler()->moduleExists('help'), 'Dependency chain was installed.'); @@ -136,10 +136,10 @@ class ModuleHandlerTest extends KernelTestBase { $this->assertEqual($module_order, array('help', 'config', 'color')); // Uninstall all three modules explicitly, but in the incorrect order, - // and make sure that ModuleHandler::uninstall() uninstalled them in the + // and make sure that ModuleInstaller::uninstall() uninstalled them in the // correct sequence. $result = $this->moduleInstaller()->uninstall(array('config', 'help', 'color')); - $this->assertTrue($result, 'ModuleHandler::uninstall() returned TRUE.'); + $this->assertTrue($result, 'ModuleInstaller::uninstall() returned TRUE.'); foreach (array('color', 'config', 'help') as $module) { $this->assertEqual(drupal_get_installed_schema_version($module), SCHEMA_UNINSTALLED, "$module module was uninstalled."); @@ -150,12 +150,12 @@ class ModuleHandlerTest extends KernelTestBase { // Enable Color module again, which should enable both the Config module and // Help module. But, this time do it with Config module declaring a // dependency on a specific version of Help module in its info file. Make - // sure that Drupal\Core\Extension\ModuleHandler::install() still works. + // sure that Drupal\Core\Extension\ModuleInstaller::install() still works. \Drupal::state()->set('module_test.dependency', 'version dependency'); drupal_static_reset('system_rebuild_module_data'); $result = $this->moduleInstaller()->install(array('color')); - $this->assertTrue($result, 'ModuleHandler::install() returns the correct value.'); + $this->assertTrue($result, 'ModuleInstaller::install() returns the correct value.'); // Verify that the fake dependency chain was installed. $this->assertTrue($this->moduleHandler()->moduleExists('config') && $this->moduleHandler()->moduleExists('help'), 'Dependency chain was installed.'); @@ -191,7 +191,7 @@ class ModuleHandlerTest extends KernelTestBase { // Uninstall the profile module "dependency". $result = $this->moduleInstaller()->uninstall(array($dependency)); - $this->assertTrue($result, 'ModuleHandler::uninstall() returns TRUE.'); + $this->assertTrue($result, 'ModuleInstaller::uninstall() returns TRUE.'); $this->assertFalse($this->moduleHandler()->moduleExists($dependency)); $this->assertEqual(drupal_get_installed_schema_version($dependency), SCHEMA_UNINSTALLED, "$dependency module was uninstalled."); @@ -229,7 +229,7 @@ class ModuleHandlerTest extends KernelTestBase { // Uninstalling entity_test is not possible when there is content. try { - $message = 'ModuleHandler::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.'; + $message = 'ModuleInstaller::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.'; $this->moduleInstaller()->uninstall(array('entity_test')); $this->fail($message); } @@ -239,7 +239,7 @@ class ModuleHandlerTest extends KernelTestBase { // Uninstalling help needs entity_test to be un-installable. try { - $message = 'ModuleHandler::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.'; + $message = 'ModuleInstaller::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.'; $this->moduleInstaller()->uninstall(array('help')); $this->fail($message); } @@ -251,7 +251,7 @@ class ModuleHandlerTest extends KernelTestBase { $entity->delete(); $result = $this->moduleInstaller()->uninstall(array('help')); - $this->assertTrue($result, 'ModuleHandler::uninstall() returns TRUE.'); + $this->assertTrue($result, 'ModuleInstaller::uninstall() returns TRUE.'); $this->assertEqual(drupal_get_installed_schema_version('entity_test'), SCHEMA_UNINSTALLED, "entity_test module was uninstalled."); }