diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
index 3c8f087..e3de04c 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
@@ -450,9 +450,9 @@ public function baseFieldDefinitions() {
    */
   protected function invokeHook($hook, EntityInterface $entity) {
     // Invoke the hook.
-    module_invoke_all($this->entityType . '_' . $hook, $entity);
+    \Drupal::moduleHandler()->invokeAll($this->entityType . '_' . $hook, array($entity));
     // Invoke the respective entity-level hook.
-    module_invoke_all('entity_' . $hook, $entity, $this->entityType);
+    \Drupal::moduleHandler()->invokeAll('entity_' . $hook, array($entity, $this->entityType));
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
index 5eeb637..235c499 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
@@ -547,9 +547,9 @@ protected function invokeHook($hook, EntityInterface $entity) {
       $function($entity);
     }
     // Invoke the hook.
-    module_invoke_all($this->entityType . '_' . $hook, $entity);
+    \Drupal::moduleHandler()->invokeAll($this->entityType . '_' . $hook, array($entity));
     // Invoke the respective entity-level hook.
-    module_invoke_all('entity_' . $hook, $entity, $this->entityType);
+    \Drupal::moduleHandler()->invokeAll('entity_' . $hook, array($entity, $this->entityType));
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityAccessController.php b/core/lib/Drupal/Core/Entity/EntityAccessController.php
index 164b83e..425d089 100644
--- a/core/lib/Drupal/Core/Entity/EntityAccessController.php
+++ b/core/lib/Drupal/Core/Entity/EntityAccessController.php
@@ -58,7 +58,7 @@ public function access(EntityInterface $entity, $operation, $langcode = Language
     // We grant access to the entity if both of these conditions are met:
     // - No modules say to deny access.
     // - At least one module says to grant access.
-    $access = module_invoke_all($entity->entityType() . '_access', $entity->getBCEntity(), $operation, $account, $langcode);
+    $access = \Drupal::moduleHandler()->invokeAll($entity->entityType() . '_access', array($entity->getBCEntity(), $operation, $account, $langcode));
 
     if (($return = $this->processAccessHookResults($access)) === NULL) {
       // No module had an opinion about the access, so let's the access
@@ -196,7 +196,7 @@ public function createAccess($entity_bundle = NULL, AccountInterface $account =
     // We grant access to the entity if both of these conditions are met:
     // - No modules say to deny access.
     // - At least one module says to grant access.
-    $access = module_invoke_all($this->entity_type . '_create_access', $account, $context['langcode']);
+    $access = \Drupal::moduleHandler()->invokeAll($this->entity_type . '_create_access', array($account, $context['langcode']));
 
     if (($return = $this->processAccessHookResults($access)) === NULL) {
       // No module had an opinion about the access, so let's the access
diff --git a/core/lib/Drupal/Core/Entity/EntityRenderController.php b/core/lib/Drupal/Core/Entity/EntityRenderController.php
index cd92f52..69a579c 100644
--- a/core/lib/Drupal/Core/Entity/EntityRenderController.php
+++ b/core/lib/Drupal/Core/Entity/EntityRenderController.php
@@ -31,7 +31,7 @@ public function __construct($entity_type) {
    */
   public function buildContent(array $entities, array $displays, $view_mode, $langcode = NULL) {
     field_attach_prepare_view($this->entityType, $entities, $displays, $langcode);
-    module_invoke_all('entity_prepare_view', $this->entityType, $entities, $displays, $view_mode);
+    \Drupal::moduleHandler()->invokeAll('entity_prepare_view', array($this->entityType, $entities, $displays, $view_mode));
 
     foreach ($entities as $entity) {
       // Remove previously built content, if exists.
@@ -139,8 +139,8 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la
     foreach ($entities as $key => $entity) {
       $entity_view_mode = isset($entity->content['#view_mode']) ? $entity->content['#view_mode'] : $view_mode;
       $display = $displays[$entity_view_mode][$entity->bundle()];
-      module_invoke_all($view_hook, $entity, $display, $entity_view_mode, $langcode);
-      module_invoke_all('entity_view', $entity, $display, $entity_view_mode, $langcode);
+      \Drupal::moduleHandler()->invokeAll($view_hook, array($entity, $display, $entity_view_mode, $langcode));
+      \Drupal::moduleHandler()->invokeAll('entity_view', array($entity, $display, $entity_view_mode, $langcode));
 
       $build[$key] = $entity->content;
       // We don't need duplicate rendering info in $entity->content.
diff --git a/core/lib/Drupal/Core/Path/Path.php b/core/lib/Drupal/Core/Path/Path.php
index 4a3410f..ada1086 100644
--- a/core/lib/Drupal/Core/Path/Path.php
+++ b/core/lib/Drupal/Core/Path/Path.php
@@ -92,7 +92,7 @@ public function save($source, $alias, $langcode = Language::LANGCODE_NOT_SPECIFI
     }
     if ($pid) {
       // @todo Switch to using an event for this instead of a hook.
-      module_invoke_all($hook, $fields);
+      \Drupal::moduleHandler()->invokeAll($hook, array($fields));
       $this->alias_manager->cacheClear();
       return $fields;
     }
@@ -138,7 +138,7 @@ public function delete($conditions) {
     }
     $deleted = $query->execute();
     // @todo Switch to using an event for this instead of a hook.
-    module_invoke_all('path_delete', $path);
+    \Drupal::moduleHandler()->invokeAll('path_delete', array($path));
     $this->alias_manager->cacheClear();
     return $deleted;
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
index 5bad9ea..bb8f0ee 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
@@ -318,7 +318,7 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $
     // Update the {node_comment_statistics} table prior to executing the hook.
     $storage_controller->updateNodeStatistics($this->nid->target_id);
     if ($this->status->value == COMMENT_PUBLISHED) {
-      module_invoke_all('comment_publish', $this);
+      \Drupal::moduleHandler()->invokeAll('comment_publish', array($this));
     }
   }
 
diff --git a/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php
index 710b991..9f568c7 100644
--- a/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php
+++ b/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php
@@ -79,7 +79,7 @@ public function __construct(array $values, $entity_type) {
 
     // Initialize settings, merging module-provided defaults.
     $default_settings = $plugin->getDefaultSettings();
-    $default_settings += module_invoke_all('editor_default_settings', $this->editor);
+    $default_settings += \Drupal::moduleHandler()->invokeAll('editor_default_settings', array($this->editor));
     drupal_alter('editor_default_settings', $default_settings, $this->editor);
     $this->settings += $default_settings;
   }
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
index 99008e2..c069409 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
@@ -274,7 +274,7 @@ public function getHighestWeight() {
     }
 
     // Let other modules feedback about their own additions.
-    $weights = array_merge($weights, module_invoke_all('field_info_max_weight', $this->targetEntityType, $this->bundle, $this->displayContext, $this->mode));
+    $weights = array_merge($weights, \Drupal::moduleHandler()->invokeAll('field_info_max_weight', array($this->targetEntityType, $this->bundle, $this->displayContext, $this->mode)));
 
     return $weights ? max($weights) : NULL;
   }
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
index a853bb6..6d4705a 100644
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
@@ -178,7 +178,7 @@ public function disable() {
     parent::disable();
 
     // Allow modules to react on text format deletion.
-    module_invoke_all('filter_format_disable', $this);
+    \Drupal::moduleHandler()->invokeAll('filter_format_disable', array($this));
 
     // Clear the filter cache whenever a text format is disabled.
     filter_formats_reset();
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index c9649ef..cf9c44e 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -347,7 +347,7 @@ public function validate(array $form, array &$form_state) {
     }
 
     // Invoke hook_node_validate() for validation needed by modules.
-    // Can't use module_invoke_all(), because $form_state must
+    // Can't use \Drupal::moduleHandler()->invokeAll(), because $form_state must
     // be receivable by reference.
     foreach (\Drupal::moduleHandler()->getImplementations('node_validate') as $module) {
       $function = $module . '_node_validate';
diff --git a/core/modules/node/lib/Drupal/node/NodeStorageController.php b/core/modules/node/lib/Drupal/node/NodeStorageController.php
index d105abf..c59bdfc 100644
--- a/core/modules/node/lib/Drupal/node/NodeStorageController.php
+++ b/core/modules/node/lib/Drupal/node/NodeStorageController.php
@@ -91,9 +91,9 @@ protected function invokeHook($hook, EntityInterface $node) {
     }
 
     // Invoke the hook.
-    module_invoke_all($this->entityType . '_' . $hook, $node);
+    \Drupal::moduleHandler()->invokeAll($this->entityType . '_' . $hook, array($node));
     // Invoke the respective entity-level hook.
-    module_invoke_all('entity_' . $hook, $node, $this->entityType);
+    \Drupal::moduleHandler()->invokeAll('entity_' . $hook, array($node, $this->entityType));
   }
 
   /**
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchExactTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchExactTest.php
index c52549f..b593612 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchExactTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchExactTest.php
@@ -42,7 +42,7 @@ function testExactQuery() {
     }
 
     // Update the search index.
-    module_invoke_all('update_index');
+    \Drupal::moduleHandler()->invokeAll('update_index');
     search_update_totals();
 
     // Refresh variables after the treatment.
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchNodeAccessTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchNodeAccessTest.php
index 67706cf..657eda2 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchNodeAccessTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchNodeAccessTest.php
@@ -45,7 +45,7 @@ function testPhraseSearchPunctuation() {
     $node = $this->drupalCreateNode(array('body' => array(array('value' => "The bunny's ears were fluffy."))));
 
     // Update the search index.
-    module_invoke_all('update_index');
+    \Drupal::moduleHandler()->invokeAll('update_index');
     search_update_totals();
 
     // Refresh variables after the treatment.
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
index 887e997..c7d84ae 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
@@ -63,7 +63,7 @@ function testRankings() {
     }
 
     // Update the search index.
-    module_invoke_all('update_index');
+    \Drupal::moduleHandler()->invokeAll('update_index');
     search_update_totals();
 
     // Refresh variables after the treatment.
@@ -143,7 +143,7 @@ function testHTMLRankings() {
     }
 
     // Update the search index.
-    module_invoke_all('update_index');
+    \Drupal::moduleHandler()->invokeAll('update_index');
     search_update_totals();
 
     // Refresh variables after the treatment.
@@ -173,7 +173,7 @@ function testHTMLRankings() {
       $node = $this->drupalCreateNode($settings);
 
       // Update the search index.
-      module_invoke_all('update_index');
+      \Drupal::moduleHandler()->invokeAll('update_index');
       search_update_totals();
 
       // Refresh variables after the treatment.
@@ -212,7 +212,7 @@ function testDoubleRankings() {
     $node = $this->drupalCreateNode($settings);
 
     // Update the search index.
-    module_invoke_all('update_index');
+    \Drupal::moduleHandler()->invokeAll('update_index');
     search_update_totals();
 
     // Refresh variables after the treatment.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
index c990234..cab34c2 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -15,7 +15,9 @@
  *
  * These tests can not access the database nor files. Calling any Drupal
  * function that needs the database will throw exceptions. These include
- * watchdog(), Drupal::moduleHandler()->getImplementations(), module_invoke_all() etc.
+ * watchdog(),
+ * \Drupal::moduleHandler()->getImplementations(),
+ * \Drupal::moduleHandler()->invokeAll() etc.
  */
 abstract class UnitTestBase extends TestBase {
 
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index a99e3d0..7ddf930 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -583,7 +583,7 @@ protected function checkPermissions(array $permissions, $reset = FALSE) {
     $available = &drupal_static(__FUNCTION__);
 
     if (!isset($available) || $reset) {
-      $available = array_keys(module_invoke_all('permission'));
+      $available = array_keys(\Drupal::moduleHandler()->invokeAll('permission'));
     }
 
     $valid = TRUE;
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
index f8a2177..6a14720 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
@@ -37,7 +37,7 @@ public static function getInfo() {
   function setUp() {
     parent::setUp();
 
-    $perms = array_keys(module_invoke_all('permission'));
+    $perms = array_keys(\Drupal::moduleHandler()->invokeAll('permission'));
     $this->admin_user = $this->drupalCreateUser($perms);
     $this->drupalLogin($this->admin_user);
 
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 d2d65bc..d99ace7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
@@ -127,13 +127,13 @@ function testModuleInvoke() {
   }
 
   /**
-   * Test that module_invoke_all() can load a hook defined in hook_hook_info().
+   * Test that \Drupal::moduleHandler()->invokeAll() can load a hook defined in hook_hook_info().
    */
   function testModuleInvokeAll() {
     module_enable(array('module_test'), FALSE);
     $this->resetAll();
     $this->drupalGet('module-test/hook-dynamic-loading-invoke-all');
-    $this->assertText('success!', 'module_invoke_all() dynamically loads a hook defined in hook_hook_info().');
+    $this->assertText('success!', 'Drupal::moduleHandler()->invokeAll() dynamically loads a hook defined in hook_hook_info().');
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
index 1c42936..fb76a7a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
@@ -36,7 +36,7 @@ function setUp() {
     // Create an administrator with all permissions, as well as a regular user
     // who can only access administration pages and perform some Locale module
     // administrative tasks, but not all of them.
-    $this->admin_user = $this->drupalCreateUser(array_keys(module_invoke_all('permission')));
+    $this->admin_user = $this->drupalCreateUser(array_keys(\Drupal::moduleHandler()->invokeAll('permission')));
     $this->web_user = $this->drupalCreateUser(array(
       'access administration pages',
       'translate interface',
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/access/Permission.php b/core/modules/user/lib/Drupal/user/Plugin/views/access/Permission.php
index d4e2933..e74c6c4 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/access/Permission.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/access/Permission.php
@@ -46,7 +46,7 @@ public function alterRouteDefinition(Route $route) {
   }
 
   public function summaryTitle() {
-    $permissions = module_invoke_all('permission');
+    $permissions = \Drupal::moduleHandler()->invokeAll('permission');
     if (isset($permissions[$this->options['perm']])) {
       return $permissions[$this->options['perm']]['title'];
     }
