diff --git a/src/Controller/SubscriptionController.php b/src/Controller/SubscriptionController.php
index 6ea2533..27a4759 100644
--- a/src/Controller/SubscriptionController.php
+++ b/src/Controller/SubscriptionController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\subscription_entity\Controller;
 
+use Drupal\Core\Link;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
@@ -27,8 +28,8 @@ class SubscriptionController extends ControllerBase implements ContainerInjectio
    *   An array suitable for drupal_render().
    */
   public function revisionShow($subscription_revision) {
-    $subscription = $this->entityManager()->getStorage('subscription')->loadRevision($subscription_revision);
-    $view_builder = $this->entityManager()->getViewBuilder('subscription');
+    $subscription = \Drupal::service('entity_type.manager')->getStorage('subscription')->loadRevision($subscription_revision);
+    $view_builder = \Drupal::service('entity_type.manager')->getViewBuilder('subscription');
 
     return $view_builder->view($subscription);
   }
@@ -43,8 +44,8 @@ class SubscriptionController extends ControllerBase implements ContainerInjectio
    *   The page title.
    */
   public function revisionPageTitle($subscription_revision) {
-    $subscription = $this->entityManager()->getStorage('subscription')->loadRevision($subscription_revision);
-    return $this->t('Revision of %title from %date', array('%title' => $subscription->label(), '%date' => format_date($subscription->getRevisionCreationTime())));
+    $subscription = \Drupal::service('entity_type.manager')->getStorage('subscription')->loadRevision($subscription_revision);
+    return $this->t('Revision of %title from %date', array('%title' => $subscription->label(), '%date' => \Drupal::service('date.formatter')->format($subscription->getRevisionCreationTime())));
   }
 
   /**
@@ -62,7 +63,7 @@ class SubscriptionController extends ControllerBase implements ContainerInjectio
     $langname = $subscription->language()->getName();
     $languages = $subscription->getTranslationLanguages();
     $has_translations = (count($languages) > 1);
-    $subscription_storage = $this->entityManager()->getStorage('subscription');
+    $subscription_storage = \Drupal::service('entity_type.manager')->getStorage('subscription');
 
     $build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $subscription->label()]) : $this->t('Revisions for %title', ['%title' => $subscription->label()]);
     $header = array($this->t('Revision'), $this->t('Operations'));
@@ -90,10 +91,14 @@ class SubscriptionController extends ControllerBase implements ContainerInjectio
         // Use revision link to link to revisions that are not active.
         $date = \Drupal::service('date.formatter')->format($revision->revision_timestamp->value, 'short');
         if ($vid != $subscription->getRevisionId()) {
-          $link = $this->l($date, new Url('entity.subscription.revision', ['subscription' => $subscription->id(), 'subscription_revision' => $vid]));
+          // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+          // Please manually remove the `use LinkGeneratorTrait;` statement from this class.
+          $link = Link::fromTextAndUrl($date, new Url('entity.subscription.revision', ['subscription' => $subscription->id(), 'subscription_revision' => $vid]));
         }
         else {
-          $link = $subscription->link($date);
+          // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+          // Please confirm that `$subscription` is an instance of `\Drupal\Core\Entity\EntityInterface`. Only the method name and not the class name was checked for this replacement, so this may be a false positive.
+          $link = $subscription->toLink($date)->toString();
         }
 
         $row = [];
diff --git a/src/Controller/SubscriptionTermController.php b/src/Controller/SubscriptionTermController.php
index c3422c3..b27f9f5 100644
--- a/src/Controller/SubscriptionTermController.php
+++ b/src/Controller/SubscriptionTermController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\subscription_entity\Controller;
 
+use Drupal\Core\Link;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
@@ -27,8 +28,8 @@ class SubscriptionTermController extends ControllerBase implements ContainerInje
    *   An array suitable for drupal_render().
    */
   public function revisionShow($subscription_term_revision) {
-    $subscription_term = $this->entityManager()->getStorage('subscription_term')->loadRevision($subscription_term_revision);
-    $view_builder = $this->entityManager()->getViewBuilder('subscription_term');
+    $subscription_term = \Drupal::service('entity_type.manager')->getStorage('subscription_term')->loadRevision($subscription_term_revision);
+    $view_builder = \Drupal::service('entity_type.manager')->getViewBuilder('subscription_term');
 
     return $view_builder->view($subscription_term);
   }
@@ -43,8 +44,8 @@ class SubscriptionTermController extends ControllerBase implements ContainerInje
    *   The page title.
    */
   public function revisionPageTitle($subscription_term_revision) {
-    $subscription_term = $this->entityManager()->getStorage('subscription_term')->loadRevision($subscription_term_revision);
-    return $this->t('Revision of %title from %date', array('%title' => $subscription_term->label(), '%date' => format_date($subscription_term->getRevisionCreationTime())));
+    $subscription_term = \Drupal::service('entity_type.manager')->getStorage('subscription_term')->loadRevision($subscription_term_revision);
+    return $this->t('Revision of %title from %date', array('%title' => $subscription_term->label(), '%date' => \Drupal::service('date.formatter')->format($subscription_term->getRevisionCreationTime())));
   }
 
   /**
@@ -62,7 +63,7 @@ class SubscriptionTermController extends ControllerBase implements ContainerInje
     $langname = $subscription_term->language()->getName();
     $languages = $subscription_term->getTranslationLanguages();
     $has_translations = (count($languages) > 1);
-    $subscription_term_storage = $this->entityManager()->getStorage('subscription_term');
+    $subscription_term_storage = \Drupal::service('entity_type.manager')->getStorage('subscription_term');
 
     $build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $subscription_term->label()]) : $this->t('Revisions for %title', ['%title' => $subscription_term->label()]);
     $header = array($this->t('Revision'), $this->t('Operations'));
@@ -90,10 +91,14 @@ class SubscriptionTermController extends ControllerBase implements ContainerInje
         // Use revision link to link to revisions that are not active.
         $date = \Drupal::service('date.formatter')->format($revision->revision_timestamp->value, 'short');
         if ($vid != $subscription_term->getRevisionId()) {
-          $link = $this->l($date, new Url('entity.subscription_term.revision', ['subscription_term' => $subscription_term->id(), 'subscription_term_revision' => $vid]));
+          // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+          // Please manually remove the `use LinkGeneratorTrait;` statement from this class.
+          $link = Link::fromTextAndUrl($date, new Url('entity.subscription_term.revision', ['subscription_term' => $subscription_term->id(), 'subscription_term_revision' => $vid]));
         }
         else {
-          $link = $subscription_term->link($date);
+          // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+          // Please confirm that `$subscription_term` is an instance of `\Drupal\Core\Entity\EntityInterface`. Only the method name and not the class name was checked for this replacement, so this may be a false positive.
+          $link = $subscription_term->toLink($date)->toString();
         }
 
         $row = [];
diff --git a/src/Form/SubscriptionForm.php b/src/Form/SubscriptionForm.php
index 0989182..36a9dbc 100644
--- a/src/Form/SubscriptionForm.php
+++ b/src/Form/SubscriptionForm.php
@@ -38,7 +38,7 @@ class SubscriptionForm extends ContentEntityForm {
 
     $owner_uid = $form_state->getValue('subscription_owner_uid')[0]['target_id'];
     if (!empty($owner_uid)) {
-      $user = user_load($owner_uid);
+      $user = \Drupal::service('entity_type.manager')->getStorage('user')->load($owner_uid);
       if (is_object($owner_uid) && $this->entity->isUserAlreadyAssigned($user) && $this->entity->isNew()) {
         $form_state->setErrorByName('subscription_owner_uid', $this->t('User is already assigned the membership type: @type', ['@type' => $this->entity->bundle()]));
       }
@@ -57,7 +57,7 @@ class SubscriptionForm extends ContentEntityForm {
       $entity->setNewRevision();
 
       // If a new revision is created, save the current user as revision author.
-      $entity->setRevisionCreationTime(REQUEST_TIME);
+      $entity->setRevisionCreationTime(\Drupal::time()->getRequestTime());
       $entity->setRevisionUserId(\Drupal::currentUser()->id());
     }
     else {
@@ -68,13 +68,13 @@ class SubscriptionForm extends ContentEntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label Subscription.', [
+        $this->messenger()->addStatus($this->t('Created the %label Subscription.', [
           '%label' => $entity->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label Subscription.', [
+        $this->messenger()->addStatus($this->t('Saved the %label Subscription.', [
           '%label' => $entity->label(),
         ]));
     }
diff --git a/src/Form/SubscriptionRevisionDeleteForm.php b/src/Form/SubscriptionRevisionDeleteForm.php
index 13f9fbc..d3f1247 100644
--- a/src/Form/SubscriptionRevisionDeleteForm.php
+++ b/src/Form/SubscriptionRevisionDeleteForm.php
@@ -72,7 +72,7 @@ class SubscriptionRevisionDeleteForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($this->revision->getRevisionCreationTime())));
+    return $this->t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime())));
   }
 
   /**
@@ -106,7 +106,7 @@ class SubscriptionRevisionDeleteForm extends ConfirmFormBase {
     $this->subscriptionStorage->deleteRevision($this->revision->getRevisionId());
 
     $this->logger('content')->notice('Subscription: deleted %title revision %revision.', array('%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()));
-    drupal_set_message($this->t('Revision from %revision-date of Subscription %title has been deleted.', array('%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label())));
+    $this->messenger()->addStatus($this->t('Revision from %revision-date of Subscription %title has been deleted.', array('%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label())));
     $form_state->setRedirect(
       'entity.subscription.canonical',
        array('subscription' => $this->revision->id())
diff --git a/src/Form/SubscriptionRevisionRevertForm.php b/src/Form/SubscriptionRevisionRevertForm.php
index e9b931b..7b7a350 100644
--- a/src/Form/SubscriptionRevisionRevertForm.php
+++ b/src/Form/SubscriptionRevisionRevertForm.php
@@ -120,7 +120,7 @@ class SubscriptionRevisionRevertForm extends ConfirmFormBase {
     $this->revision->save();
 
     $this->logger('content')->notice('Subscription: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
-    drupal_set_message(t('Subscription %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
+    $this->messenger()->addStatus(t('Subscription %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
     $form_state->setRedirect(
       'entity.subscription.version_history',
       array('subscription' => $this->revision->id())
@@ -141,7 +141,7 @@ class SubscriptionRevisionRevertForm extends ConfirmFormBase {
   protected function prepareRevertedRevision(subscriptionInterface $revision, FormStateInterface $form_state) {
     $revision->setNewRevision();
     $revision->isDefaultRevision(TRUE);
-    $revision->setRevisionCreationTime(REQUEST_TIME);
+    $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
 
     return $revision;
   }
diff --git a/src/Form/SubscriptionRevisionRevertTranslationForm.php b/src/Form/SubscriptionRevisionRevertTranslationForm.php
index 0cc5f0e..7256c72 100644
--- a/src/Form/SubscriptionRevisionRevertTranslationForm.php
+++ b/src/Form/SubscriptionRevisionRevertTranslationForm.php
@@ -107,7 +107,7 @@ class SubscriptionRevisionRevertTranslationForm extends SubscriptionRevisionReve
 
     $latest_revision_translation->setNewRevision();
     $latest_revision_translation->isDefaultRevision(TRUE);
-    $revision->setRevisionCreationTime(REQUEST_TIME);
+    $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
 
     return $latest_revision_translation;
   }
diff --git a/src/Form/SubscriptionTermForm.php b/src/Form/SubscriptionTermForm.php
index 2e8fd2a..cc5b291 100644
--- a/src/Form/SubscriptionTermForm.php
+++ b/src/Form/SubscriptionTermForm.php
@@ -42,7 +42,7 @@ class SubscriptionTermForm extends ContentEntityForm {
       $entity->setNewRevision();
 
       // If a new revision is created, save the current user as revision author.
-      $entity->setRevisionCreationTime(REQUEST_TIME);
+      $entity->setRevisionCreationTime(\Drupal::time()->getRequestTime());
       $entity->setRevisionUserId(\Drupal::currentUser()->id());
     }
     else {
@@ -53,13 +53,13 @@ class SubscriptionTermForm extends ContentEntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label Subscription Term.', [
+        $this->messenger()->addStatus($this->t('Created the %label Subscription Term.', [
           '%label' => $entity->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label Subscription Term.', [
+        $this->messenger()->addStatus($this->t('Saved the %label Subscription Term.', [
           '%label' => $entity->label(),
         ]));
     }
diff --git a/src/Form/SubscriptionTermRevisionDeleteForm.php b/src/Form/SubscriptionTermRevisionDeleteForm.php
index 9290d8a..d4addc7 100644
--- a/src/Form/SubscriptionTermRevisionDeleteForm.php
+++ b/src/Form/SubscriptionTermRevisionDeleteForm.php
@@ -73,7 +73,7 @@ class SubscriptionTermRevisionDeleteForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($this->revision->getRevisionCreationTime())));
+    return $this->t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime())));
   }
 
   /**
@@ -107,7 +107,7 @@ class SubscriptionTermRevisionDeleteForm extends ConfirmFormBase {
     $this->subscriptionTermStorage->deleteRevision($this->revision->getRevisionId());
 
     $this->logger('content')->notice('Subscription Term: deleted %title revision %revision.', array('%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()));
-    drupal_set_message($this->t('Revision from %revision-date of Subscription Term %title has been deleted.', array('%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label())));
+    $this->messenger()->addStatus($this->t('Revision from %revision-date of Subscription Term %title has been deleted.', array('%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label())));
     $form_state->setRedirect(
       'entity.subscription_term.canonical',
        array('subscription_term' => $this->revision->id())
diff --git a/src/Form/SubscriptionTermRevisionRevertForm.php b/src/Form/SubscriptionTermRevisionRevertForm.php
index 405951b..9f830b1 100644
--- a/src/Form/SubscriptionTermRevisionRevertForm.php
+++ b/src/Form/SubscriptionTermRevisionRevertForm.php
@@ -120,7 +120,7 @@ class SubscriptionTermRevisionRevertForm extends ConfirmFormBase {
     $this->revision->save();
 
     $this->logger('content')->notice('Subscription Term: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
-    drupal_set_message(t('Subscription Term %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
+    $this->messenger()->addStatus(t('Subscription Term %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
     $form_state->setRedirect(
       'entity.subscription_term.version_history',
       array('subscription_term' => $this->revision->id())
@@ -141,7 +141,7 @@ class SubscriptionTermRevisionRevertForm extends ConfirmFormBase {
   protected function prepareRevertedRevision(SubscriptionTermInterface $revision, FormStateInterface $form_state) {
     $revision->setNewRevision();
     $revision->isDefaultRevision(TRUE);
-    $revision->setRevisionCreationTime(REQUEST_TIME);
+    $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
 
     return $revision;
   }
diff --git a/src/Form/SubscriptionTermRevisionRevertTranslationForm.php b/src/Form/SubscriptionTermRevisionRevertTranslationForm.php
index eb78010..248676d 100644
--- a/src/Form/SubscriptionTermRevisionRevertTranslationForm.php
+++ b/src/Form/SubscriptionTermRevisionRevertTranslationForm.php
@@ -107,7 +107,7 @@ class SubscriptionTermRevisionRevertTranslationForm extends SubscriptionTermRevi
 
     $latest_revision_translation->setNewRevision();
     $latest_revision_translation->isDefaultRevision(TRUE);
-    $revision->setRevisionCreationTime(REQUEST_TIME);
+    $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
 
     return $latest_revision_translation;
   }
diff --git a/src/Form/SubscriptionTermTypeDeleteForm.php b/src/Form/SubscriptionTermTypeDeleteForm.php
index 199713a..07eb84e 100644
--- a/src/Form/SubscriptionTermTypeDeleteForm.php
+++ b/src/Form/SubscriptionTermTypeDeleteForm.php
@@ -38,14 +38,12 @@ class SubscriptionTermTypeDeleteForm extends EntityConfirmFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $this->entity->delete();
 
-    drupal_set_message(
-      $this->t('content @type: deleted @label.',
-        [
-          '@type' => $this->entity->bundle(),
-          '@label' => $this->entity->label(),
-        ]
-        )
-    );
+    $this->messenger()->addStatus($this->t('content @type: deleted @label.',
+      [
+        '@type' => $this->entity->bundle(),
+        '@label' => $this->entity->label(),
+      ]
+      ));
 
     $form_state->setRedirectUrl($this->getCancelUrl());
   }
diff --git a/src/Form/SubscriptionTermTypeForm.php b/src/Form/SubscriptionTermTypeForm.php
index 8a2f57e..f5010a1 100644
--- a/src/Form/SubscriptionTermTypeForm.php
+++ b/src/Form/SubscriptionTermTypeForm.php
@@ -51,13 +51,13 @@ class SubscriptionTermTypeForm extends EntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label Subscription Term type.', [
+        $this->messenger()->addStatus($this->t('Created the %label Subscription Term type.', [
           '%label' => $subscription_term_type->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label Subscription Term type.', [
+        $this->messenger()->addStatus($this->t('Saved the %label Subscription Term type.', [
           '%label' => $subscription_term_type->label(),
         ]));
     }
diff --git a/src/Form/SubscriptionTypeDeleteForm.php b/src/Form/SubscriptionTypeDeleteForm.php
index 4f9be00..7607a53 100644
--- a/src/Form/SubscriptionTypeDeleteForm.php
+++ b/src/Form/SubscriptionTypeDeleteForm.php
@@ -38,14 +38,12 @@ class SubscriptionTypeDeleteForm extends EntityConfirmFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $this->entity->delete();
 
-    drupal_set_message(
-      $this->t('content @type: deleted @label.',
-        [
-          '@type' => $this->entity->bundle(),
-          '@label' => $this->entity->label(),
-        ]
-        )
-    );
+    $this->messenger()->addStatus($this->t('content @type: deleted @label.',
+      [
+        '@type' => $this->entity->bundle(),
+        '@label' => $this->entity->label(),
+      ]
+      ));
 
     $form_state->setRedirectUrl($this->getCancelUrl());
   }
diff --git a/src/Form/SubscriptionTypeForm.php b/src/Form/SubscriptionTypeForm.php
index f24f316..b789505 100644
--- a/src/Form/SubscriptionTypeForm.php
+++ b/src/Form/SubscriptionTypeForm.php
@@ -61,13 +61,13 @@ class SubscriptionTypeForm extends EntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label Subscription type.', [
+        $this->messenger()->addStatus($this->t('Created the %label Subscription type.', [
           '%label' => $subscription_type->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label Subscription type.', [
+        $this->messenger()->addStatus($this->t('Saved the %label Subscription type.', [
           '%label' => $subscription_type->label(),
         ]));
     }
diff --git a/src/SubscriptionListBuilder.php b/src/SubscriptionListBuilder.php
index 3591a98..cd82108 100644
--- a/src/SubscriptionListBuilder.php
+++ b/src/SubscriptionListBuilder.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\subscription_entity;
 
+use Drupal\Core\Link;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityListBuilder;
 use Drupal\Core\Routing\LinkGeneratorTrait;
@@ -31,14 +32,13 @@ class SubscriptionListBuilder extends EntityListBuilder {
   public function buildRow(EntityInterface $entity) {
     /* @var $entity \Drupal\subscription_entity\Entity\subscription */
     $row['id'] = $entity->id();
-    $row['subscription_ref'] = $this->l(
-      $entity->label(),
-      new Url(
-        'entity.subscription.canonical', array(
-          'subscription' => $entity->id(),
-        )
+    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+    // Please manually remove the `use LinkGeneratorTrait;` statement from this class.
+    $row['subscription_ref'] = Link::fromTextAndUrl($entity->label(), new Url(
+      'entity.subscription.canonical', array(
+        'subscription' => $entity->id(),
       )
-    );
+    ));
     return $row + parent::buildRow($entity);
   }
 
diff --git a/src/SubscriptionTermListBuilder.php b/src/SubscriptionTermListBuilder.php
index 18c0d53..60fa56e 100644
--- a/src/SubscriptionTermListBuilder.php
+++ b/src/SubscriptionTermListBuilder.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\subscription_entity;
 
+use Drupal\Core\Link;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityListBuilder;
 use Drupal\Core\Routing\LinkGeneratorTrait;
@@ -31,14 +32,13 @@ class SubscriptionTermListBuilder extends EntityListBuilder {
   public function buildRow(EntityInterface $entity) {
     /* @var $entity \Drupal\subscription_entity\Entity\subscription_term */
     $row['id'] = $entity->id();
-    $row['name'] = $this->l(
-      $entity->label(),
-      new Url(
-        'entity.subscription_term.edit_form', array(
-          'subscription_term' => $entity->id(),
-        )
+    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+    // Please manually remove the `use LinkGeneratorTrait;` statement from this class.
+    $row['name'] = Link::fromTextAndUrl($entity->label(), new Url(
+      'entity.subscription_term.edit_form', array(
+        'subscription_term' => $entity->id(),
       )
-    );
+    ));
     return $row + parent::buildRow($entity);
   }
 
diff --git a/tests/src/Unit/SubscriptionTypeTest.php b/tests/src/Unit/SubscriptionTypeTest.php
index f1bbbcf..1a86245 100644
--- a/tests/src/Unit/SubscriptionTypeTest.php
+++ b/tests/src/Unit/SubscriptionTypeTest.php
@@ -16,7 +16,7 @@ class SubscriptionTypeTest extends UnitTestCase {
    * @covers ::getSiteRoles
    */
   public function testGetSiteRoles() {
-    $subscriptionType = $this->getMock('Drupal\subscription_entity\Entity\subscriptionTypeInterface');
+    $subscriptionType = $this->createMock('Drupal\subscription_entity\Entity\subscriptionTypeInterface');
     $subscriptionType->expects($this->never())->method('getSiteRoles')->willReturn(array());
   }
 
