diff --git a/media_fotoweb.info.yml b/media_fotoweb.info.yml
index fd3ccd2..13aeb21 100644
--- a/media_fotoweb.info.yml
+++ b/media_fotoweb.info.yml
@@ -1,7 +1,7 @@
 name: 'Media Fotoweb'
 type: module
 description: 'Integrates media with the digital asset management from fotoware.com'
-core_version_requirement: ^8.7.7 || ^9
+core_version_requirement: ^9.3 || ^10
 package: 'Media'
 configure: media_fotoweb.settings
 
diff --git a/src/Plugin/media/Source/Fotoweb.php b/src/Plugin/media/Source/Fotoweb.php
index 9640393..87c3864 100644
--- a/src/Plugin/media/Source/Fotoweb.php
+++ b/src/Plugin/media/Source/Fotoweb.php
@@ -358,7 +358,7 @@ class Fotoweb extends MediaSourceBase {
         }
     }
 
-    $file = file_save_data($data, $destination_path, $replace);
+    $file = \Drupal::service('file.repository')->writeData($data, $destination_path, $replace);
 
     return $file;
   }
diff --git a/tests/src/Unit/FotowebLoginManagerTest.php b/tests/src/Unit/FotowebLoginManagerTest.php
index 69ca8a9..e130e61 100644
--- a/tests/src/Unit/FotowebLoginManagerTest.php
+++ b/tests/src/Unit/FotowebLoginManagerTest.php
@@ -28,7 +28,7 @@ class FotowebLoginManagerTest extends UnitTestCase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $config_factory = $this
@@ -42,17 +42,13 @@ class FotowebLoginManagerTest extends UnitTestCase {
     $container->set('config.factory', $config_factory);
 
     // Create mocks.
-    $fieldItem = $this->getMockBuilder(FieldItemListInterface::class)
-      ->disableOriginalConstructor()
-      ->getMock();
+    $fieldItem = $this->createMock(FieldItemListInterface::class);
     $fieldItem->expects($this->any())
       ->method('__get')
       ->with('value')
       ->willReturn('fotoweb_testuser');
 
-    $testUser = $this->getMockBuilder('Drupal\user\Entity\User')
-      ->disableOriginalConstructor()
-      ->getMock();
+    $testUser = $this->createMock('Drupal\user\Entity\User');
     $testUser->expects($this->any())
       ->method('hasField')
       ->with('name')
@@ -83,7 +79,7 @@ class FotowebLoginManagerTest extends UnitTestCase {
     $username = 'fotoweb_testuser';
     // The login token uses time based components, so we are only checking
     // for the expected format.
-    $this->assertRegExp('/^[A-Za-z0-9]{0,130}==$/', $this->fotowebLoginManager->getUserLoginTokenFromUsername($username));
+    $this->assertMatchesRegularExpression('/^[A-Za-z0-9]{0,130}==$/', $this->fotowebLoginManager->getUserLoginTokenFromUsername($username));
   }
 
   /**
@@ -95,7 +91,7 @@ class FotowebLoginManagerTest extends UnitTestCase {
       ->method('id')
       ->will($this->returnValue(1));
 
-    $this->assertRegExp('/^[A-Za-z0-9]{0,130}==$/', $this->fotowebLoginManager->getLoginTokenFromAccount($account));
+    $this->assertMatchesRegularExpression('/^[A-Za-z0-9]{0,130}==$/', $this->fotowebLoginManager->getLoginTokenFromAccount($account));
   }
 
 }
diff --git a/tests/src/Unit/RenditionImageFetcherTest.php b/tests/src/Unit/RenditionImageFetcherTest.php
index f02e37b..a3c7f1d 100644
--- a/tests/src/Unit/RenditionImageFetcherTest.php
+++ b/tests/src/Unit/RenditionImageFetcherTest.php
@@ -30,7 +30,7 @@ class RenditionImageFetcherTest extends UnitTestCase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $configFactory = $this
diff --git a/tests/src/Unit/RenditionNegotiatorTest.php b/tests/src/Unit/RenditionNegotiatorTest.php
index dd5b1d2..363a072 100644
--- a/tests/src/Unit/RenditionNegotiatorTest.php
+++ b/tests/src/Unit/RenditionNegotiatorTest.php
@@ -24,7 +24,7 @@ class RenditionNegotiatorTest extends UnitTestCase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $configFactory = $this
