diff --git a/tests/src/Functional/TrashIgnoreTest.php b/tests/src/Functional/TrashIgnoreTest.php
index f6b353d..2ab116d 100644
--- a/tests/src/Functional/TrashIgnoreTest.php
+++ b/tests/src/Functional/TrashIgnoreTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
@@ -13,6 +15,8 @@ use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashIgnoreTest extends BrowserTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Functional/TrashNodeTest.php b/tests/src/Functional/TrashNodeTest.php
index 1242cd3..7375c2c 100644
--- a/tests/src/Functional/TrashNodeTest.php
+++ b/tests/src/Functional/TrashNodeTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Url;
 use Drupal\Tests\BrowserTestBase;
 use Symfony\Component\HttpFoundation\Response;
@@ -13,6 +15,8 @@ use Symfony\Component\HttpFoundation\Response;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashNodeTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/TrashSettingsFormTest.php b/tests/src/Functional/TrashSettingsFormTest.php
index be307bc..0d554d3 100644
--- a/tests/src/Functional/TrashSettingsFormTest.php
+++ b/tests/src/Functional/TrashSettingsFormTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -11,6 +13,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashSettingsFormTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/TrashUniqueFieldTest.php b/tests/src/Functional/TrashUniqueFieldTest.php
index 89b6599..aa7f12a 100644
--- a/tests/src/Functional/TrashUniqueFieldTest.php
+++ b/tests/src/Functional/TrashUniqueFieldTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\trash_test\Entity\TrashTestEntity;
@@ -13,6 +15,8 @@ use Drupal\trash_test\Entity\TrashTestEntity;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashUniqueFieldTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/TrashViewsListingTest.php b/tests/src/Functional/TrashViewsListingTest.php
index e9b231f..56784c3 100644
--- a/tests/src/Functional/TrashViewsListingTest.php
+++ b/tests/src/Functional/TrashViewsListingTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\trash_test\Entity\TrashTestEntity;
 
@@ -12,6 +14,8 @@ use Drupal\trash_test\Entity\TrashTestEntity;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashViewsListingTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/TrashWorkspaceIgnoreTest.php b/tests/src/Functional/TrashWorkspaceIgnoreTest.php
index 93eec58..a1263a9 100644
--- a/tests/src/Functional/TrashWorkspaceIgnoreTest.php
+++ b/tests/src/Functional/TrashWorkspaceIgnoreTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
 use Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities;
@@ -14,6 +16,8 @@ use Drupal\workspaces\Entity\Workspace;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 final class TrashWorkspaceIgnoreTest extends BrowserTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Kernel/EntityAccessTest.php b/tests/src/Kernel/EntityAccessTest.php
index 1a91425..318ad5e 100644
--- a/tests/src/Kernel/EntityAccessTest.php
+++ b/tests/src/Kernel/EntityAccessTest.php
@@ -4,11 +4,17 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
+use PHPUnit\Framework\Attributes\DataProvider;
+
 /**
  * Tests entity access for trashed entities.
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class EntityAccessTest extends TrashKernelTestBase {
 
   /**
@@ -16,6 +22,7 @@ class EntityAccessTest extends TrashKernelTestBase {
    *
    * @dataProvider providerTestEntityAccess
    */
+  #[DataProvider('providerTestEntityAccess')]
   public function testEntityAccess(string $permission, array $access_map): void {
     $account = $this->createUser([
       'access content',
diff --git a/tests/src/Kernel/EntityQueryTest.php b/tests/src/Kernel/EntityQueryTest.php
index 9e4aaef..92fe8a3 100644
--- a/tests/src/Kernel/EntityQueryTest.php
+++ b/tests/src/Kernel/EntityQueryTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\trash_test\Entity\TrashTestEntity;
 
 /**
@@ -11,6 +13,8 @@ use Drupal\trash_test\Entity\TrashTestEntity;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class EntityQueryTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/NodeSearchTest.php b/tests/src/Kernel/NodeSearchTest.php
index 69b48ed..a97c0cb 100644
--- a/tests/src/Kernel/NodeSearchTest.php
+++ b/tests/src/Kernel/NodeSearchTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\trash\Plugin\Search\TrashNodeSearch;
 
 /**
@@ -11,6 +13,8 @@ use Drupal\trash\Plugin\Search\TrashNodeSearch;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class NodeSearchTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashAliasRepositoryTest.php b/tests/src/Kernel/TrashAliasRepositoryTest.php
index e3820a7..7065d83 100644
--- a/tests/src/Kernel/TrashAliasRepositoryTest.php
+++ b/tests/src/Kernel/TrashAliasRepositoryTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\path_alias\AliasManagerInterface;
 use Drupal\path_alias\AliasRepositoryInterface;
 use Drupal\path_alias\Entity\PathAlias;
@@ -14,6 +16,8 @@ use Drupal\trash\Exception\UnrestorableEntityException;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashAliasRepositoryTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashFileTest.php b/tests/src/Kernel/TrashFileTest.php
index a5314ba..328a4d1 100644
--- a/tests/src/Kernel/TrashFileTest.php
+++ b/tests/src/Kernel/TrashFileTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\File\FileSystemInterface;
 use Drupal\Core\Logger\LoggerChannelFactoryInterface;
 use Drupal\file\Entity\File;
@@ -17,6 +19,8 @@ use Symfony\Component\ErrorHandler\BufferingLogger;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashFileTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashKernelTest.php b/tests/src/Kernel/TrashKernelTest.php
index 6f4b0d3..eadc240 100644
--- a/tests/src/Kernel/TrashKernelTest.php
+++ b/tests/src/Kernel/TrashKernelTest.php
@@ -4,6 +4,9 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
+use PHPUnit\Framework\Attributes\DataProvider;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\ContentEntityStorageInterface;
 use Drupal\node\Entity\Node;
@@ -15,6 +18,8 @@ use Drupal\user\Entity\User;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashKernelTest extends TrashKernelTestBase {
 
   /**
@@ -164,6 +169,7 @@ class TrashKernelTest extends TrashKernelTestBase {
    *
    * @dataProvider providerIsEntityTypeEnabled
    */
+  #[DataProvider('providerIsEntityTypeEnabled')]
   public function testIsEntityTypeEnabled($entity_type_id, $bundle, $enabled): void {
     $this->assertSame($enabled, $this->getTrashManager()->isEntityTypeEnabled($entity_type_id, $bundle));
     $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
diff --git a/tests/src/Kernel/TrashMenuLinkTest.php b/tests/src/Kernel/TrashMenuLinkTest.php
index 56e231a..c5c1a16 100644
--- a/tests/src/Kernel/TrashMenuLinkTest.php
+++ b/tests/src/Kernel/TrashMenuLinkTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Menu\MenuTreeParameters;
 use Drupal\menu_link_content\Entity\MenuLinkContent;
@@ -15,6 +17,8 @@ use Drupal\system\Entity\Menu;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashMenuLinkTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashPathAliasTest.php b/tests/src/Kernel/TrashPathAliasTest.php
index e774564..b988d1f 100644
--- a/tests/src/Kernel/TrashPathAliasTest.php
+++ b/tests/src/Kernel/TrashPathAliasTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\node\Entity\Node;
 use Drupal\path_alias\Entity\PathAlias;
@@ -15,6 +17,8 @@ use Drupal\Tests\node\Traits\NodeCreationTrait;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashPathAliasTest extends TrashKernelTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Kernel/TrashRedirectTest.php b/tests/src/Kernel/TrashRedirectTest.php
index 6285867..d33be0b 100644
--- a/tests/src/Kernel/TrashRedirectTest.php
+++ b/tests/src/Kernel/TrashRedirectTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\redirect\Entity\Redirect;
 use Drupal\trash\Exception\UnrestorableEntityException;
 use Drupal\trash\TrashViewBuilder;
@@ -13,6 +15,8 @@ use Drupal\trash\TrashViewBuilder;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashRedirectTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashTaxonomyTermTest.php b/tests/src/Kernel/TrashTaxonomyTermTest.php
index 15880d6..fb6f1e8 100644
--- a/tests/src/Kernel/TrashTaxonomyTermTest.php
+++ b/tests/src/Kernel/TrashTaxonomyTermTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\taxonomy\Entity\Term;
 use Drupal\taxonomy\TermStorageInterface;
 use Drupal\taxonomy\VocabularyInterface;
@@ -12,6 +14,8 @@ use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashTaxonomyTermTest extends TrashKernelTestBase {
 
   use TaxonomyTestTrait;
diff --git a/tests/src/Kernel/TrashUninstallTest.php b/tests/src/Kernel/TrashUninstallTest.php
index 6bd8570..a4ba9bf 100644
--- a/tests/src/Kernel/TrashUninstallTest.php
+++ b/tests/src/Kernel/TrashUninstallTest.php
@@ -4,11 +4,13 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\trash_test\Entity\TrashTestEntity;
 
 /**
  * Tests uninstall validator for Trash.
  */
+#[RunTestsInSeparateProcesses]
 class TrashUninstallTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashViewBuilderTest.php b/tests/src/Kernel/TrashViewBuilderTest.php
index bbe301f..e9b16e6 100644
--- a/tests/src/Kernel/TrashViewBuilderTest.php
+++ b/tests/src/Kernel/TrashViewBuilderTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\trash\TrashViewBuilder;
 
@@ -12,6 +14,8 @@ use Drupal\trash\TrashViewBuilder;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashViewBuilderTest extends TrashKernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/TrashWorkspacesTest.php b/tests/src/Kernel/TrashWorkspacesTest.php
index af8e5c3..e30d8ea 100644
--- a/tests/src/Kernel/TrashWorkspacesTest.php
+++ b/tests/src/Kernel/TrashWorkspacesTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\workspaces\Kernel\WorkspaceTestTrait;
 use Drupal\trash\EntityQuery\Workspaces\QueryFactory;
 use Drupal\workspaces\Entity\Workspace;
@@ -13,6 +15,8 @@ use Drupal\workspaces\Entity\Workspace;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class TrashWorkspacesTest extends TrashKernelTestBase {
 
   use WorkspaceTestTrait;
diff --git a/tests/src/Kernel/ViewQueryTest.php b/tests/src/Kernel/ViewQueryTest.php
index 33a7deb..bcb2b27 100644
--- a/tests/src/Kernel/ViewQueryTest.php
+++ b/tests/src/Kernel/ViewQueryTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\trash_test\Entity\TrashTestEntity;
 use Drupal\views\Tests\ViewResultAssertionTrait;
 use Drupal\views\Views;
@@ -13,6 +15,8 @@ use Drupal\views\Views;
  *
  * @group trash
  */
+#[Group('trash')]
+#[RunTestsInSeparateProcesses]
 class ViewQueryTest extends TrashKernelTestBase {
 
   use ViewResultAssertionTrait;
diff --git a/tests/src/Unit/Plugin/QueueWorker/TrashEntityPurgeWorkerTest.php b/tests/src/Unit/Plugin/QueueWorker/TrashEntityPurgeWorkerTest.php
index 6588ed0..2e0db39 100644
--- a/tests/src/Unit/Plugin/QueueWorker/TrashEntityPurgeWorkerTest.php
+++ b/tests/src/Unit/Plugin/QueueWorker/TrashEntityPurgeWorkerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Unit\Plugin\QueueWorker;
 
+use PHPUnit\Framework\Attributes\Group;
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Core\Entity\ContentEntityStorageInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
@@ -23,6 +24,7 @@ use Psr\Log\LoggerInterface;
  * @coversDefaultClass \Drupal\trash\Plugin\QueueWorker\TrashEntityPurgeWorker
  * @group trash
  */
+#[Group('trash')]
 class TrashEntityPurgeWorkerTest extends UnitTestCase {
 
   /**
diff --git a/tests/src/Unit/TrashEntityPurgerTest.php b/tests/src/Unit/TrashEntityPurgerTest.php
index 0a55288..bda55fe 100644
--- a/tests/src/Unit/TrashEntityPurgerTest.php
+++ b/tests/src/Unit/TrashEntityPurgerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\trash\Unit;
 
+use PHPUnit\Framework\Attributes\Group;
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Core\Config\Config;
 use Drupal\Core\Config\ConfigFactoryInterface;
@@ -24,6 +25,7 @@ use PHPUnit\Framework\MockObject\MockObject;
  * @coversDefaultClass \Drupal\trash\TrashEntityPurger
  * @group trash
  */
+#[Group('trash')]
 class TrashEntityPurgerTest extends UnitTestCase {
 
   /**
diff --git a/trash.api.php b/trash.api.php
index baf8a59..3d29637 100644
--- a/trash.api.php
+++ b/trash.api.php
@@ -1,5 +1,13 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\views\ViewExecutable;
+use Drupal\Core\Entity\EntityTypeInterface;
+
 /**
  * @file
  * Hooks and documentation related to Trash.
@@ -19,7 +27,7 @@
  * @ingroup entity_crud
  * @see hook_ENTITY_TYPE_pre_trash_delete()
  */
-function hook_entity_pre_trash_delete(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_entity_pre_trash_delete(EntityInterface $entity) {
 }
 
 /**
@@ -31,7 +39,7 @@ function hook_entity_pre_trash_delete(\Drupal\Core\Entity\EntityInterface $entit
  * @ingroup entity_crud
  * @see hook_entity_pre_trash_delete()
  */
-function hook_ENTITY_TYPE_pre_trash_delete(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_ENTITY_TYPE_pre_trash_delete(EntityInterface $entity) {
 }
 
 /**
@@ -45,7 +53,7 @@ function hook_ENTITY_TYPE_pre_trash_delete(\Drupal\Core\Entity\EntityInterface $
  * @ingroup entity_crud
  * @see hook_ENTITY_TYPE_trash_delete()
  */
-function hook_entity_trash_delete(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_entity_trash_delete(EntityInterface $entity) {
 }
 
 /**
@@ -59,7 +67,7 @@ function hook_entity_trash_delete(\Drupal\Core\Entity\EntityInterface $entity) {
  * @ingroup entity_crud
  * @see hook_entity_trash_delete()
  */
-function hook_ENTITY_TYPE_trash_delete(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_ENTITY_TYPE_trash_delete(EntityInterface $entity) {
 }
 
 /**
@@ -71,7 +79,7 @@ function hook_ENTITY_TYPE_trash_delete(\Drupal\Core\Entity\EntityInterface $enti
  * @ingroup entity_crud
  * @see hook_ENTITY_TYPE_pre_trash_restore()
  */
-function hook_entity_pre_trash_restore(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_entity_pre_trash_restore(EntityInterface $entity) {
 }
 
 /**
@@ -83,7 +91,7 @@ function hook_entity_pre_trash_restore(\Drupal\Core\Entity\EntityInterface $enti
  * @ingroup entity_crud
  * @see hook_entity_pre_trash_restore()
  */
-function hook_ENTITY_TYPE_pre_trash_restore(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_ENTITY_TYPE_pre_trash_restore(EntityInterface $entity) {
 }
 
 /**
@@ -97,7 +105,7 @@ function hook_ENTITY_TYPE_pre_trash_restore(\Drupal\Core\Entity\EntityInterface
  * @ingroup entity_crud
  * @see hook_ENTITY_TYPE_trash_restore()
  */
-function hook_entity_trash_restore(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_entity_trash_restore(EntityInterface $entity) {
 }
 
 /**
@@ -111,7 +119,7 @@ function hook_entity_trash_restore(\Drupal\Core\Entity\EntityInterface $entity)
  * @ingroup entity_crud
  * @see hook_entity_trash_restore()
  */
-function hook_ENTITY_TYPE_trash_restore(\Drupal\Core\Entity\EntityInterface $entity) {
+function hook_ENTITY_TYPE_trash_restore(EntityInterface $entity) {
 }
 
 /**
@@ -126,7 +134,7 @@ function hook_ENTITY_TYPE_trash_restore(\Drupal\Core\Entity\EntityInterface $ent
  *
  * @see \Drupal\trash\TrashViewBuilder
  */
-function hook_trash_views_build(\Drupal\views\ViewExecutable $view, \Drupal\Core\Entity\EntityTypeInterface $entity_type, bool $export) {
+function hook_trash_views_build(ViewExecutable $view, EntityTypeInterface $entity_type, bool $export) {
   // ID field.
   $id_key = $entity_type->getKey('id');
   if ($id_key) {
diff --git a/trash.install b/trash.install
index 845afd4..f29eb5e 100644
--- a/trash.install
+++ b/trash.install
@@ -5,6 +5,8 @@
  * Install, update, and uninstall functions for the Trash module.
  */
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
 use Drupal\Core\Url;
 use Drupal\trash\Form\TrashSettingsForm;
 
@@ -27,7 +29,7 @@ function trash_requirements(string $phase): array {
       $requirements['trash_disallowed_entity_types'] = [
         'title' => t('Trash'),
         'value' => t('Unsupported entity types enabled'),
-        'severity' => REQUIREMENT_WARNING,
+        'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Warning, fn() => REQUIREMENT_WARNING),
         'description' => t('Trash is enabled for the following entity types that are not supported and can cause errors: %entity_types.<br />Disable them on the <a href=":url">Trash settings</a> page.', [
           '%entity_types' => implode(', ', $labels),
           ':url' => Url::fromRoute('trash.settings.form')->toString(),
diff --git a/trash.post_update.php b/trash.post_update.php
index 3613e60..d50ad7a 100644
--- a/trash.post_update.php
+++ b/trash.post_update.php
@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Component\Utility\DeprecationHelper;
+
 /**
  * @file
  * Install, update, and uninstall functions for the Trash module.
@@ -23,7 +29,7 @@ function trash_post_update_fix_missing_auto_purge(): void {
       'enabled' => FALSE,
       'after' => '30 days',
     ]);
-    $config->save(TRUE);
+    DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $config->save(), fn() => $config->save(TRUE));
   }
 }
 
