diff --git a/src/DroogleConnector.php b/src/DroogleConnector.php
index 108218a..b9fdc24 100644
--- a/src/DroogleConnector.php
+++ b/src/DroogleConnector.php
@@ -49,7 +49,7 @@ class DroogleConnector {
       $_SESSION['upload_token'] = $client->getAccessToken();
       $this->setRefreshToken($client->getRefreshToken());
       // Redirect to  custom redirect_url if it was sent.
-      drupal_set_message(t('You have successfully authenticated into Google Drive'));
+      \Drupal::messenger()->addMessage(t('You have successfully authenticated into Google Drive'));
       if (!empty($redirect_url)) {
         return new RedirectResponse(filter_var($redirect_url, FILTER_SANITIZE_URL));
       }
diff --git a/src/Form/DroogleSettingsForm.php b/src/Form/DroogleSettingsForm.php
index 44feceb..7185882 100644
--- a/src/Form/DroogleSettingsForm.php
+++ b/src/Form/DroogleSettingsForm.php
@@ -9,7 +9,7 @@ namespace Drupal\droogle\Form;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Path\AliasManagerInterface;
+use Drupal\path_alias\AliasManagerInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Path\PathValidatorInterface;
 use Drupal\Core\Routing\RequestContext;
@@ -23,7 +23,7 @@ class DroogleSettingsForm extends ConfigFormBase {
   /**
    * The path alias manager.
    *
-   * @var \Drupal\Core\Path\AliasManagerInterface
+   * @var \Drupal\path_alias\AliasManagerInterface
    */
   protected $aliasManager;
 
@@ -46,7 +46,7 @@ class DroogleSettingsForm extends ConfigFormBase {
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The factory for configuration objects.
-   * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
+   * @param \Drupal\path_alias\AliasManagerInterface $alias_manager
    *   The path alias manager.
    * @param \Drupal\Core\Path\PathValidatorInterface $path_validator
    *   The path validator.
@@ -67,7 +67,7 @@ class DroogleSettingsForm extends ConfigFormBase {
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('config.factory'),
-      $container->get('path.alias_manager'),
+      $container->get('path_alias.manager'),
       $container->get('path.validator'),
       $container->get('router.request_context')
     );
