diff --git a/encrypt.install b/encrypt.install
index c432615..cc35a89 100644
--- a/encrypt.install
+++ b/encrypt.install
@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Component\Utility\DeprecationHelper;
+
 /**
  * @file
  * Install and hook_update_nn functions for the encrypt module.
@@ -16,7 +22,7 @@ function encrypt_update_8001() {
     $key = $config_factory->getEditable($key_config_name);
     if ($key->get('key_type') == 'aes_encryption') {
       $key->set('key_type', 'encryption');
-      $key->save(TRUE);
+      DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $key->save(), fn() => $key->save(TRUE));
       $updated = TRUE;
     }
   }
@@ -62,7 +68,7 @@ function encrypt_update_8002() {
         $config_names = (is_array($config_names) ? $config_names : []);
         $config_names[] = 'key.key.' . $encryption_profile->getEncryptionKeyId();
         $profile_config->set('dependencies.config', $config_names);
-        $profile_config->save(TRUE);
+        DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $profile_config->save(), fn() => $profile_config->save(TRUE));
         $updated = TRUE;
       }
     }
@@ -83,5 +89,5 @@ function encrypt_update_8003() {
   $config_factory = \Drupal::configFactory();
   $config = $config_factory->getEditable('encrypt.settings');
   $config->set('allow_deprecated_plugins', FALSE);
-  $config->save(TRUE);
+  DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $config->save(), fn() => $config->save(TRUE));
 }
diff --git a/tests/src/Functional/EncryptTest.php b/tests/src/Functional/EncryptTest.php
index d0d5a76..61d1db8 100644
--- a/tests/src/Functional/EncryptTest.php
+++ b/tests/src/Functional/EncryptTest.php
@@ -2,11 +2,16 @@
 
 namespace Drupal\Tests\encrypt\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
+
 /**
  * Tests the encrypt admin UI and encryption / decryption service.
  *
  * @group encrypt
  */
+#[Group('encrypt')]
+#[RunTestsInSeparateProcesses]
 class EncryptTest extends EncryptTestBase {
 
   /**
diff --git a/tests/src/Kernel/AsymmetricalEncryptionMethod.php b/tests/src/Kernel/AsymmetricalEncryptionMethod.php
index c8eade0..a56ed23 100644
--- a/tests/src/Kernel/AsymmetricalEncryptionMethod.php
+++ b/tests/src/Kernel/AsymmetricalEncryptionMethod.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\encrypt\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\encrypt\Entity\EncryptionProfile;
 use Drupal\encrypt\Exception\EncryptionMethodCanNotDecryptException;
@@ -12,6 +14,8 @@ use Drupal\key\Entity\Key;
  *
  * @group encrypt
  */
+#[Group('encrypt')]
+#[RunTestsInSeparateProcesses]
 class AsymmetricalEncryptionMethod extends KernelTestBase {
 
   /**
diff --git a/tests/src/Unit/EncryptServiceTest.php b/tests/src/Unit/EncryptServiceTest.php
index b8121d8..6aebef5 100644
--- a/tests/src/Unit/EncryptServiceTest.php
+++ b/tests/src/Unit/EncryptServiceTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\encrypt\Unit;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\DataProvider;
 use Drupal\Tests\UnitTestCase;
 use Drupal\encrypt\EncryptService;
 use Drupal\encrypt\EncryptionMethodInterface;
@@ -21,6 +23,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
  *
  * @coversDefaultClass \Drupal\encrypt\EncryptService
  */
+#[Group('encrypt')]
 class EncryptServiceTest extends UnitTestCase {
 
   use ProphecyTrait;
@@ -129,6 +132,7 @@ class EncryptServiceTest extends UnitTestCase {
    *
    * @dataProvider encryptionDataProvider
    */
+  #[DataProvider('encryptionDataProvider')]
   public function testEncryptDecrypt($key, $valid_key) {
     // Set up expectations for Key.
     $this->key->getKeyValue()->willReturn($key);
@@ -206,7 +210,7 @@ class EncryptServiceTest extends UnitTestCase {
    * @return array
    *   An array with data for the test method.
    */
-  public function encryptionDataProvider() {
+  public static function encryptionDataProvider() {
     return [
       'normal' => ["validkey", TRUE],
       'exception' => ["invalidkey", FALSE],
diff --git a/tests/src/Unit/Entity/EncryptionProfileTest.php b/tests/src/Unit/Entity/EncryptionProfileTest.php
index dec930b..3831d52 100644
--- a/tests/src/Unit/Entity/EncryptionProfileTest.php
+++ b/tests/src/Unit/Entity/EncryptionProfileTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\encrypt\Unit\Entity;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\DataProvider;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Tests\UnitTestCase;
 use Drupal\encrypt\EncryptionMethodInterface;
@@ -17,6 +19,7 @@ use Drupal\key\KeyInterface;
  *
  * @coversDefaultClass \Drupal\encrypt\Entity\EncryptionProfile
  */
+#[Group('encrypt')]
 class EncryptionProfileTest extends UnitTestCase {
 
   /**
@@ -95,7 +98,6 @@ class EncryptionProfileTest extends UnitTestCase {
     else {
       $this->pluginCollection = $mock_builder_plugin_collection
         ->disableOriginalConstructor()
-        ->setMethods(['get', 'set', 'addInstanceID'])
         ->getMock();
     }
   }
@@ -108,6 +110,7 @@ class EncryptionProfileTest extends UnitTestCase {
    *
    * @dataProvider validateDataProvider
    */
+  #[DataProvider('validateDataProvider')]
   public function testValidate($enc_method_id, $enc_key, $enc_method_def, $expected_errors) {
     // Set up a mock for the EncryptionProfile class to mock some methods.
     $mock_builder_encryption_profile = $this->getMockBuilder('\Drupal\encrypt\Entity\EncryptionProfile');
@@ -127,14 +130,6 @@ class EncryptionProfileTest extends UnitTestCase {
     }
     else {
       $encryption_profile = $mock_builder_encryption_profile
-        ->setMethods(
-          [
-            'getEncryptionMethod',
-            'getEncryptionMethodId',
-            'getEncryptionKey',
-            'getEncryptionKeyId',
-          ]
-        )
         ->disableOriginalConstructor()
         ->getMock();
     }
@@ -179,7 +174,7 @@ class EncryptionProfileTest extends UnitTestCase {
   /**
    * Data provider for validate() function.
    */
-  public function validateDataProvider() {
+  public static function validateDataProvider() {
     $valid_definition = [
       'id' => 'test_encryption_method',
       'title' => "Test encryption method",
@@ -245,12 +240,6 @@ class EncryptionProfileTest extends UnitTestCase {
     }
     else {
       $encryption_profile = $mock_builder_encryption_profile
-        ->setMethods(
-          [
-            'getPluginCollection',
-            'getEncryptionMethodId',
-          ]
-        )
         ->disableOriginalConstructor()
         ->getMock();
     }
@@ -290,7 +279,6 @@ class EncryptionProfileTest extends UnitTestCase {
     }
     else {
       $encryption_profile = $mock_builder_encryption_profile
-        ->setMethods(['getPluginCollection'])
         ->disableOriginalConstructor()
         ->getMock();
     }
@@ -333,12 +321,6 @@ class EncryptionProfileTest extends UnitTestCase {
     }
     else {
       $encryption_profile = $this->getMockBuilder('\Drupal\encrypt\Entity\EncryptionProfile')
-        ->setMethods(
-          [
-            'getKeyRepository',
-            'getEncryptionKeyId',
-          ]
-        )
         ->disableOriginalConstructor()
         ->getMock();
     }
