diff --git a/core/modules/book/tests/src/Kernel/BookUninstallTest.php b/core/modules/book/tests/src/Kernel/BookUninstallTest.php index 817b1335c1..d4205ebf11 100644 --- a/core/modules/book/tests/src/Kernel/BookUninstallTest.php +++ b/core/modules/book/tests/src/Kernel/BookUninstallTest.php @@ -76,7 +76,7 @@ public function testBookUninstall() { $book_node->delete(); // No nodes exist therefore the book module is not required. - $module_data = \Drupal::service('extension.list.module')->reset()->list(); + $module_data = \Drupal::service('extension.list.module')->reset()->getList(); $this->assertFalse(isset($module_data['book']->info['required']), 'The book module is not required.'); $node = Node::create(['title' => $this->randomString(), 'type' => $content_type->id()]); diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php index 0760699328..d5ab64914e 100644 --- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php +++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php @@ -488,7 +488,7 @@ public function testDependencyRemoval() { drupal_static_reset('filter_formats'); \Drupal::entityManager()->getStorage('filter_format')->resetCache(); - $module_data = \Drupal::service('extension.list.module')->reset()->list(); + $module_data = \Drupal::service('extension.list.module')->reset()->getList(); $this->assertFalse(isset($module_data['filter_test']->info['required']), 'The filter_test module is required.'); // Verify that a dependency exists on the module that provides the filter diff --git a/core/modules/system/system.module b/core/modules/system/system.module index f54f28057c..9d70a0d00b 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1020,14 +1020,14 @@ function _system_rebuild_module_data_ensure_required($module, &$modules) { * An associative array of module information. * * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. - * Use \Drupal::service('extension.list.module')->reset()->list() + * Use \Drupal::service('extension.list.module')->reset()->getList() * instead. Note: You probably don't need the reset() method. * * @see https://www.drupal.org/node/2709919 */ function _system_rebuild_module_data() { - @trigger_error("_system_rebuild_module_data() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \\Drupal::service('extension.list.module')->reset()->list(). See https://www.drupal.org/node/2709919", E_USER_DEPRECATED); - return \Drupal::service('extension.list.module')->reset()->list(); + @trigger_error("_system_rebuild_module_data() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \\Drupal::service('extension.list.module')->reset()->getList(). See https://www.drupal.org/node/2709919", E_USER_DEPRECATED); + return \Drupal::service('extension.list.module')->reset()->getList(); } /** @@ -1037,7 +1037,7 @@ function _system_rebuild_module_data() { * Array of all available modules and their data. */ function system_rebuild_module_data() { - return \Drupal::service('extension.list.module')->reset()->list(); + return \Drupal::service('extension.list.module')->reset()->getList(); } /** diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php index dcad79ee13..a8767e92d5 100644 --- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php @@ -182,7 +182,7 @@ public function testUninstallProfileDependency() { drupal_get_filename('profile', $profile, 'core/profiles/' . $profile . '/' . $profile . '.info.yml'); $this->enableModules(['module_test', $profile]); - $data = \Drupal::service('extension.list.module')->reset()->list(); + $data = \Drupal::service('extension.list.module')->reset()->getList(); $this->assertTrue(isset($data[$profile]->requires[$dependency])); $this->moduleInstaller()->install([$dependency]);