diff --git a/config_partial_export.info.yml b/config_partial_export.info.yml
index 9177e46..19f57cf 100644
--- a/config_partial_export.info.yml
+++ b/config_partial_export.info.yml
@@ -1,6 +1,6 @@
 name: 'Configuration Partial Export'
 type: module
-core_version_requirement: '^10 || ^11'
+core_version_requirement: ^10.1 || ^11 || ^12
 description: 'Partial export of selected configuration files.'
 package: Development
 dependencies:
diff --git a/config_partial_export.module b/config_partial_export.module
index a94f49e..9a25d4d 100644
--- a/config_partial_export.module
+++ b/config_partial_export.module
@@ -1,5 +1,12 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\config_partial_export\Hook\ConfigPartialExportHooks;
+
 /**
  * @file
  * Allows site administrators to modify configuration.
@@ -8,23 +15,7 @@
 /**
  * Implements hook_file_download().
  */
+#[LegacyHook]
 function config_partial_export_file_download($uri): array|bool {
-  $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
-  $scheme = $stream_wrapper_manager->getScheme($uri);
-  $target = $stream_wrapper_manager->getTarget($uri);
-
-  if ($scheme !== 'temporary' || $target !== 'config_partial.tar.gz') {
-    return FALSE;
-  }
-
-  $request = \Drupal::request();
-  $date = DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME'));
-  $date_string = $date->format('Y-m-d-H-i');
-  $hostname = str_replace('.', '-', $request->getHttpHost());
-  $filename = "config_partial-{$hostname}-{$date_string}.tar.gz";
-  $disposition = 'attachment; filename="' . $filename . '"';
-
-  return [
-    'Content-disposition' => $disposition,
-  ];
+  return \Drupal::service(ConfigPartialExportHooks::class)->fileDownload($uri);
 }
diff --git a/config_partial_export.services.yml b/config_partial_export.services.yml
new file mode 100644
index 0000000..c51b257
--- /dev/null
+++ b/config_partial_export.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\config_partial_export\Hook\ConfigPartialExportHooks:
+    class: Drupal\config_partial_export\Hook\ConfigPartialExportHooks
+    autowire: true
diff --git a/src/Hook/ConfigPartialExportHooks.php b/src/Hook/ConfigPartialExportHooks.php
new file mode 100644
index 0000000..fe63687
--- /dev/null
+++ b/src/Hook/ConfigPartialExportHooks.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\config_partial_export\Hook;
+
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for config_partial_export.
+ */
+class ConfigPartialExportHooks {
+  /**
+   * @file
+   * Allows site administrators to modify configuration.
+   */
+
+  /**
+   * Implements hook_file_download().
+   */
+  #[Hook('file_download')]
+  public function fileDownload($uri): array|bool {
+    $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
+    $scheme = $stream_wrapper_manager->getScheme($uri);
+    $target = $stream_wrapper_manager->getTarget($uri);
+    if ($scheme !== 'temporary' || $target !== 'config_partial.tar.gz') {
+      return FALSE;
+    }
+    $request = \Drupal::request();
+    $date = \DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME'));
+    $date_string = $date->format('Y-m-d-H-i');
+    $hostname = str_replace('.', '-', $request->getHttpHost());
+    $filename = "config_partial-{$hostname}-{$date_string}.tar.gz";
+    $disposition = 'attachment; filename="' . $filename . '"';
+    return [
+      'Content-disposition' => $disposition,
+    ];
+  }
+
+}
diff --git a/tests/src/Functional/ConfigPartialExportFormSubmitTest.php b/tests/src/Functional/ConfigPartialExportFormSubmitTest.php
index accf98b..a1e4c51 100644
--- a/tests/src/Functional/ConfigPartialExportFormSubmitTest.php
+++ b/tests/src/Functional/ConfigPartialExportFormSubmitTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\config_partial_export\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -13,6 +15,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group config_partial_export
  */
+#[Group('config_partial_export')]
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportFormSubmitTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/ConfigPartialExportTest.php b/tests/src/Functional/ConfigPartialExportTest.php
index afc60f7..b030781 100644
--- a/tests/src/Functional/ConfigPartialExportTest.php
+++ b/tests/src/Functional/ConfigPartialExportTest.php
@@ -2,11 +2,13 @@
 
 namespace Drupal\Tests\config_partial_export\Functional;
 
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
  * Class to functional tests in config partial export module.
  */
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Kernel/ConfigPartialExportArchiveTest.php b/tests/src/Kernel/ConfigPartialExportArchiveTest.php
index 854e96d..6c1cd55 100644
--- a/tests/src/Kernel/ConfigPartialExportArchiveTest.php
+++ b/tests/src/Kernel/ConfigPartialExportArchiveTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\config_partial_export\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Component\Serialization\Yaml;
 use Drupal\Core\Archiver\ArchiveTar;
 use Drupal\config_partial_export\Form\ConfigPartialExportForm;
@@ -15,6 +17,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group config_partial_export
  */
+#[Group('config_partial_export')]
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportArchiveTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/ConfigPartialExportRoutingTest.php b/tests/src/Kernel/ConfigPartialExportRoutingTest.php
index c81d664..ec0b5e4 100644
--- a/tests/src/Kernel/ConfigPartialExportRoutingTest.php
+++ b/tests/src/Kernel/ConfigPartialExportRoutingTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\config_partial_export\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 
@@ -19,6 +21,8 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException;
  *
  * @group config_partial_export
  */
+#[Group('config_partial_export')]
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportRoutingTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/ConfigPartialExportStateTest.php b/tests/src/Kernel/ConfigPartialExportStateTest.php
index 4d8c8f1..1a4d576 100644
--- a/tests/src/Kernel/ConfigPartialExportStateTest.php
+++ b/tests/src/Kernel/ConfigPartialExportStateTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\config_partial_export\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 
 /**
@@ -23,6 +25,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group config_partial_export
  */
+#[Group('config_partial_export')]
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportStateTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/ConfigPartialExportStorageComparerTest.php b/tests/src/Kernel/ConfigPartialExportStorageComparerTest.php
index e3f334c..569cfa3 100644
--- a/tests/src/Kernel/ConfigPartialExportStorageComparerTest.php
+++ b/tests/src/Kernel/ConfigPartialExportStorageComparerTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\config_partial_export\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Config\StorageComparer;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -14,6 +16,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group config_partial_export
  */
+#[Group('config_partial_export')]
+#[RunTestsInSeparateProcesses]
 class ConfigPartialExportStorageComparerTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Unit/ConfigPartialExportCommandsTest.php b/tests/src/Unit/ConfigPartialExportCommandsTest.php
index 65999a0..507b3e2 100644
--- a/tests/src/Unit/ConfigPartialExportCommandsTest.php
+++ b/tests/src/Unit/ConfigPartialExportCommandsTest.php
@@ -22,6 +22,8 @@ use Drush\Log\DrushLoggerManager;
  * @group legacy
  * @coversDefaultClass \Drupal\config_partial_export\Commands\ConfigPartialExportCommands
  */
+#[\PHPUnit\Framework\Attributes\Group('config_partial_export')]
+#[\PHPUnit\Framework\Attributes\IgnoreDeprecations]
 class ConfigPartialExportCommandsTest extends UnitTestCase {
 
   /**
@@ -76,7 +78,6 @@ class ConfigPartialExportCommandsTest extends UnitTestCase {
    */
   private function invokeGetMatchingConfigs(string $input, StorageInterface $storage): array {
     $ref = new \ReflectionMethod($this->commands, 'getMatchingConfigs');
-    $ref->setAccessible(TRUE);
     return $ref->invoke($this->commands, $input, $storage);
   }
 
diff --git a/tests/src/Unit/ConfigPartialExportFormValidationTest.php b/tests/src/Unit/ConfigPartialExportFormValidationTest.php
index a841371..67ca28b 100644
--- a/tests/src/Unit/ConfigPartialExportFormValidationTest.php
+++ b/tests/src/Unit/ConfigPartialExportFormValidationTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\config_partial_export\Unit;
 
+use PHPUnit\Framework\Attributes\Group;
 use Drupal\config_partial_export\Form\ConfigPartialExportForm;
 use Drupal\Core\Config\ConfigManagerInterface;
 use Drupal\Core\Config\StorageInterface;
@@ -25,6 +26,7 @@ use Drupal\Tests\UnitTestCase;
  * @group config_partial_export
  * @coversDefaultClass \Drupal\config_partial_export\Form\ConfigPartialExportForm
  */
+#[Group('config_partial_export')]
 class ConfigPartialExportFormValidationTest extends UnitTestCase {
 
   /**
