diff --git a/modules/votingapi/src/VoteResultFunctionManager.php b/modules/votingapi/src/VoteResultFunctionManager.php
index 63f0c64..2fc4392 100644
--- a/modules/votingapi/src/VoteResultFunctionManager.php
+++ b/modules/votingapi/src/VoteResultFunctionManager.php
@@ -139,7 +139,7 @@ protected function performAndStore($votes) {
         'type' => $vote_type,
         'function' => $plugin_id,
         'value' => $plugin->calculateResult($votes),
-        'timestamp' => REQUEST_TIME,
+        'timestamp' => \Drupal::time()->getRequestTime(),
       ))->execute();
     }
   }
diff --git a/modules/votingapi/src/VoteTypeForm.php b/modules/votingapi/src/VoteTypeForm.php
index dc639c4..9d253a5 100644
--- a/modules/votingapi/src/VoteTypeForm.php
+++ b/modules/votingapi/src/VoteTypeForm.php
@@ -141,7 +141,7 @@ public function save(array $form, FormStateInterface $form_state) {
     }
     elseif ($status == SAVED_NEW) {
       drupal_set_message(t('The vote type %name has been added.', $t_args));
-      $context = array_merge($t_args, array('link' => $type->link($this->t('View'), 'collection')));
+      $context = array_merge($t_args, array('link' => $type->toLink($this->t('View'), 'collection')));
       $this->logger('vote')->notice('Added vote type %name.', $context);
     }
 
diff --git a/modules/votingapi/votingapi.drush.inc b/modules/votingapi/votingapi.drush.inc
index f9716a1..20758a5 100644
--- a/modules/votingapi/votingapi.drush.inc
+++ b/modules/votingapi/votingapi.drush.inc
@@ -85,8 +85,8 @@ function votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent',
   );
 
   if (!empty($options['kill_votes'])) {
-    db_truncate('votingapi_vote');
-    db_truncate('votingapi_cache');
+    \Drupal::database()->truncate('votingapi_vote');
+    \Drupal::database()->truncate('votingapi_cache');
   }
 
   if (($schema = drupal_get_schema($entity_type)) && ($entity_id_column = array_shift($schema['primary key']))) {
@@ -126,7 +126,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
           'entity_type' => $etype,
           'entity_id' => $eid,
           'value_type' => 'percent',
-          'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
+          'timestamp' => \Drupal::time()->getRequestTime() - mt_rand(0, $timestamp),
           'value' => mt_rand(1, 5) * 20,
           'tag' => $tags[mt_rand(0, 30)],
         );
@@ -138,7 +138,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
             'entity_type' => $etype,
             'entity_id' => $eid,
             'value_type' => 'points',
-            'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
+            'timestamp' => \Drupal::time()->getRequestTime() - mt_rand(0, $timestamp),
             'value' => rand(0, 1) ? 1 : -1,
           );
         }
diff --git a/modules/votingapi/votingapi.module b/modules/votingapi/votingapi.module
index ce74b03..be8d571 100644
--- a/modules/votingapi/votingapi.module
+++ b/modules/votingapi/votingapi.module
@@ -67,6 +67,6 @@ function votingapi_cron() {
         $entity['type']
       );
     }
-    Drupal::state()->set('votingapi.last_cron', REQUEST_TIME);
+    Drupal::state()->set('votingapi.last_cron', \Drupal::time()->getRequestTime());
   }
 }
\ No newline at end of file
