diff --git a/src/Form/Profile/FormBase.php b/src/Form/Profile/FormBase.php
index 52f2d94..eb12b5a 100644
--- a/src/Form/Profile/FormBase.php
+++ b/src/Form/Profile/FormBase.php
@@ -69,7 +69,7 @@ abstract class FormBase extends EntityForm {
     $linkit_profile->set('label', trim($linkit_profile->label()));
 
     $status = $linkit_profile->save();
-    $edit_link = $this->entity->link($this->t('Edit'));
+    $edit_link = $this->entity->toLink($this->t('Edit'))->toString();
     switch ($status) {
       case SAVED_NEW:
         drupal_set_message($this->t('Created new profile %label.', ['%label' => $linkit_profile->label()]));
@@ -82,7 +82,7 @@ abstract class FormBase extends EntityForm {
       case SAVED_UPDATED:
         drupal_set_message($this->t('Updated profile %label.', ['%label' => $linkit_profile->label()]));
         $this->logger('linkit')->notice('Updated profile %label.', ['%label' => $linkit_profile->label(), 'link' => $edit_link]);
-        $form_state->setRedirectUrl($linkit_profile->urlInfo('edit-form'));
+        $form_state->setRedirectUrl($linkit_profile->toUrl('edit-form'));
         break;
     }
   }
diff --git a/src/MatcherInterface.php b/src/MatcherInterface.php
index ef5d981..78d6ff2 100644
--- a/src/MatcherInterface.php
+++ b/src/MatcherInterface.php
@@ -9,7 +9,6 @@ namespace Drupal\linkit;
 
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
 use Drupal\Component\Plugin\PluginInspectionInterface;
-use Drupal\Core\Plugin\PluginFormInterface;
 
 /**
  * Defines the interface for matchers.
diff --git a/src/Plugin/Derivative/EntityMatcherDeriver.php b/src/Plugin/Derivative/EntityMatcherDeriver.php
index b5fcf50..ba9662d 100644
--- a/src/Plugin/Derivative/EntityMatcherDeriver.php
+++ b/src/Plugin/Derivative/EntityMatcherDeriver.php
@@ -8,8 +8,7 @@
 namespace Drupal\linkit\Plugin\Derivative;
 
 use Drupal\Component\Plugin\Derivative\DeriverBase;
-use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -29,10 +28,10 @@ class EntityMatcherDeriver extends DeriverBase implements ContainerDeriverInterf
   /**
    * Creates an EntityMatcherDeriver object.
    *
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager
    *   The entity manager.
    */
-  public function __construct(EntityManagerInterface $entity_manager) {
+  public function __construct(EntityTypeManagerInterface $entity_manager) {
     $this->entityManager = $entity_manager;
   }
 
diff --git a/src/Plugin/Linkit/Attribute/Clazz.php b/src/Plugin/Linkit/Attribute/Clazz.php
index 03787e7..f185345 100644
--- a/src/Plugin/Linkit/Attribute/Clazz.php
+++ b/src/Plugin/Linkit/Attribute/Clazz.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\linkit\Plugin\Linkit\Attribute;
 
-use Drupal\linkit\AttributeBase;
-
 /**
  * Class attribute.
  *
diff --git a/src/Plugin/Linkit/Matcher/EntityMatcher.php b/src/Plugin/Linkit/Matcher/EntityMatcher.php
index 98a1eb7..d58cd5f 100644
--- a/src/Plugin/Linkit/Matcher/EntityMatcher.php
+++ b/src/Plugin/Linkit/Matcher/EntityMatcher.php
@@ -9,7 +9,7 @@ namespace Drupal\linkit\Plugin\Linkit\Matcher;
 
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Database\Connection;
-use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -67,7 +67,7 @@ class EntityMatcher extends ConfigurableMatcherBase {
   /**
    * {@inheritdoc}
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler,   AccountInterface $current_user) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, EntityTypeManagerInterface $entity_manager, ModuleHandlerInterface $module_handler,   AccountInterface $current_user) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     if (empty($plugin_definition['target_entity'])) {
diff --git a/src/Plugin/Linkit/Matcher/FileMatcher.php b/src/Plugin/Linkit/Matcher/FileMatcher.php
index 16f40ea..f97d6d1 100644
--- a/src/Plugin/Linkit/Matcher/FileMatcher.php
+++ b/src/Plugin/Linkit/Matcher/FileMatcher.php
@@ -183,6 +183,6 @@ class FileMatcher extends EntityMatcher {
    * entity interface.
    */
   protected function buildPath($entity) {
-    return $entity->url();
+    return $entity->toUrl()->toUriString();
   }
 }
