diff --git a/file_browser.install b/file_browser.install
index eefbf58..c8e2e63 100644
--- a/file_browser.install
+++ b/file_browser.install
@@ -18,7 +18,7 @@ function file_browser_install() {
   if (!\Drupal::isConfigSyncing()) {
     $data = file_get_contents(dirname(__FILE__) . '/file_browser_icon.png');
     /** @var \Drupal\file\FileInterface $file */
-    $file = file_save_data($data, 'public://file_browser_icon.png', FileSystemInterface::EXISTS_REPLACE);
+    $file = \Drupal::service('file.repository')->writeData($data, 'public://file_browser_icon.png', FileSystemInterface::EXISTS_REPLACE);
     if ($file) {
       // Set file uuid same as default config.
       $uuid = Yaml::decode(file_get_contents(dirname(__FILE__) . '/config/install/embed.button.file_browser.yml'))['icon_uuid'];
diff --git a/src/Plugin/views/field/FileBrowserPreview.php b/src/Plugin/views/field/FileBrowserPreview.php
index 3c1c33f..51a8716 100644
--- a/src/Plugin/views/field/FileBrowserPreview.php
+++ b/src/Plugin/views/field/FileBrowserPreview.php
@@ -88,7 +88,7 @@ class FileBrowserPreview extends FieldPluginBase {
     // Use a placeholder image for now.
     // @todo See if we can use fallback formatters for this.
     else {
-      $path = drupal_get_path('module', 'file_browser');
+      $path = \Drupal::service('extension.list.module')->getPath('file_browser');
       $build = [
         '#theme' => 'image',
         '#attributes' => [
diff --git a/tests/src/Functional/InstallTest.php b/tests/src/Functional/InstallTest.php
index 20daa95..e18add8 100644
--- a/tests/src/Functional/InstallTest.php
+++ b/tests/src/Functional/InstallTest.php
@@ -27,7 +27,7 @@ class InstallTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file_browser'];
+  protected static $modules = ['file_browser'];
 
   /**
    * Tests if the module can be installed during a config sync.
diff --git a/tests/src/FunctionalJavascript/FileBrowserTest.php b/tests/src/FunctionalJavascript/FileBrowserTest.php
index 13a6fd0..2a670bb 100644
--- a/tests/src/FunctionalJavascript/FileBrowserTest.php
+++ b/tests/src/FunctionalJavascript/FileBrowserTest.php
@@ -14,7 +14,7 @@ class FileBrowserTest extends EntityBrowserWebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'file_browser',
   ];
 
