diff --git a/pathauto.services.yml b/pathauto.services.yml
index 3d3a760..bc9ae4e 100644
--- a/pathauto.services.yml
+++ b/pathauto.services.yml
@@ -1,7 +1,7 @@
 services:
   pathauto.generator:
     class: Drupal\pathauto\PathautoGenerator
-    arguments: ['@config.factory', '@module_handler', '@token', '@pathauto.alias_cleaner', '@pathauto.alias_storage_helper', '@pathauto.alias_uniquifier', '@pathauto.verbose_messenger', '@string_translation', '@token.entity_mapper']
+    arguments: ['@config.factory', '@module_handler', '@token', '@pathauto.alias_cleaner', '@pathauto.alias_storage_helper', '@pathauto.alias_uniquifier', '@pathauto.verbose_messenger', '@string_translation', '@token.entity_mapper', '@entity_type.manager']
   pathauto.alias_cleaner:
     class: Drupal\pathauto\AliasCleaner
     arguments: ['@config.factory', '@pathauto.alias_storage_helper', '@language_manager', '@cache.discovery', '@transliteration', '@module_handler']
diff --git a/src/PathautoGenerator.php b/src/PathautoGenerator.php
index 34b1098..7d3f4b1 100644
--- a/src/PathautoGenerator.php
+++ b/src/PathautoGenerator.php
@@ -18,6 +18,7 @@ use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\Core\Utility\Token;
 use Drupal\token\TokenEntityMapperInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 
 /**
  * Provides methods for generating path aliases.
@@ -95,6 +96,10 @@ class PathautoGenerator implements PathautoGeneratorInterface {
   protected $tokenEntityMapper;
 
   /**
+   * @var Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  
+  /**
    * Creates a new Pathauto manager.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
@@ -113,8 +118,10 @@ class PathautoGenerator implements PathautoGeneratorInterface {
    *   The messenger service.
    * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
    *   The string translation service.
+   * @param Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
+   * The entity type manager
    */
-  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, Token $token, AliasCleanerInterface $alias_cleaner, AliasStorageHelperInterface $alias_storage_helper, AliasUniquifierInterface $alias_uniquifier, MessengerInterface $messenger, TranslationInterface $string_translation, TokenEntityMapperInterface $token_entity_mappper) {
+  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, Token $token, AliasCleanerInterface $alias_cleaner, AliasStorageHelperInterface $alias_storage_helper, AliasUniquifierInterface $alias_uniquifier, MessengerInterface $messenger, TranslationInterface $string_translation, TokenEntityMapperInterface $token_entity_mappper, EntityTypeManagerInterface $entity_type_manager) {
     $this->configFactory = $config_factory;
     $this->moduleHandler = $module_handler;
     $this->token = $token;
@@ -124,6 +131,7 @@ class PathautoGenerator implements PathautoGeneratorInterface {
     $this->messenger = $messenger;
     $this->stringTranslation = $string_translation;
     $this->tokenEntityMapper = $token_entity_mappper;
+    $this->entityTypeManager = $entity_type_manager;
   }
 
   /**
@@ -349,7 +357,6 @@ class PathautoGenerator implements PathautoGeneratorInterface {
    *   An array of term objects that are the children of the term $tid.
    */
   protected function loadTermChildren($tid) {
-    return \Drupal::entityManager()->getStorage('taxonomy_term')->loadChildren($tid);
+    return $this->entityTypeManager->get('entity_type.manager')->getStorage('taxonomy_term')->loadChildren($tid);
   }
-
 }
diff --git a/src/Tests/PathautoBulkUpdateTest.php b/src/Tests/PathautoBulkUpdateTest.php
index 368366e..afc01bb 100644
--- a/src/Tests/PathautoBulkUpdateTest.php
+++ b/src/Tests/PathautoBulkUpdateTest.php
@@ -106,7 +106,7 @@ class PathautoBulkUpdateTest extends WebTestBase {
     // Delete its alias and Pathauto metadata.
     \Drupal::service('pathauto.alias_storage_helper')->deleteEntityPathAll($node);
     $node->path->first()->get('pathauto')->purge();
-    \Drupal::entityManager()->getStorage('node')->resetCache(array($node->id()));
+    \Drupal::entityTypeManager()->getStorage('node')->resetCache(array($node->id()));
 
     // Execute bulk generation.
     // Bulk create aliases.
diff --git a/src/Tests/PathautoNodeWebTest.php b/src/Tests/PathautoNodeWebTest.php
index add4dfa..c1d347c 100644
--- a/src/Tests/PathautoNodeWebTest.php
+++ b/src/Tests/PathautoNodeWebTest.php
@@ -189,7 +189,7 @@ class PathautoNodeWebTest extends WebTestBase {
     $node->save();
 
     // Ensure that the pathauto field was saved to the database.
-    \Drupal::entityManager()->getStorage('node')->resetCache();
+    \Drupal::entityTypeManager()->getStorage('node')->resetCache();
     $node = Node::load($node->id());
     $this->assertIdentical($node->path->pathauto, PathautoState::SKIP);
 
@@ -230,13 +230,13 @@ class PathautoNodeWebTest extends WebTestBase {
     $this->assertNoEntityAliasExists($node, '/content/node-version-three');
 
     // Programatically save the node with an automatic alias.
-    \Drupal::entityManager()->getStorage('node')->resetCache();
+    \Drupal::entityTypeManager()->getStorage('node')->resetCache();
     $node = Node::load($node->id());
     $node->path->pathauto = PathautoState::CREATE;
     $node->save();
 
     // Ensure that the pathauto field was saved to the database.
-    \Drupal::entityManager()->getStorage('node')->resetCache();
+    \Drupal::entityTypeManager()->getStorage('node')->resetCache();
     $node = Node::load($node->id());
     $this->assertIdentical($node->path->pathauto, PathautoState::CREATE);
 
diff --git a/src/Tests/PathautoTestHelperTrait.php b/src/Tests/PathautoTestHelperTrait.php
index 14c7ea4..f62cdb7 100644
--- a/src/Tests/PathautoTestHelperTrait.php
+++ b/src/Tests/PathautoTestHelperTrait.php
@@ -186,7 +186,7 @@ trait PathautoTestHelperTrait {
     if ($reset) {
       // @todo - implement cache reset.
     }
-    $terms = \Drupal::entityManager()->getStorage('taxonomy_term')->loadByProperties(array('name' => $name));
+    $terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(array('name' => $name));
     return !empty($terms) ? reset($terms) : FALSE;
   }
 }
diff --git a/tests/src/Kernel/PathautoKernelTest.php b/tests/src/Kernel/PathautoKernelTest.php
index e503bc3..0fb4aa9 100644
--- a/tests/src/Kernel/PathautoKernelTest.php
+++ b/tests/src/Kernel/PathautoKernelTest.php
@@ -156,7 +156,7 @@ class PathautoKernelTest extends KernelTestBase {
       ),
     );
     foreach ($tests as $test) {
-      $entity = \Drupal::entityManager()->getStorage($test['entity'])->create($test['values']);
+      $entity = \Drupal::entityTypeManager()->getStorage($test['entity'])->create($test['values']);
       $entity->save();
       $actual = \Drupal::service('pathauto.generator')->getPatternByEntity($entity);
       $this->assertIdentical($actual->getPattern(), $test['expected'], t("Correct pattern returned for @entity_type with @values", array(
