diff --git a/bigmenu.module b/bigmenu.module
index 055e1c2..31dbb5c 100755
--- a/bigmenu.module
+++ b/bigmenu.module
@@ -7,12 +7,13 @@
  * Needed when menus get too big to load on one page.
  */
 
-use Drupal\bigmenu\BigMenuForm;
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\bigmenu\Hook\BigmenuHooks;
 
 /**
  * Implements hook_entity_type_alter().
  */
+#[LegacyHook]
 function bigmenu_entity_type_alter(array &$entity_types) {
-  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
-  $entity_types['menu']->setFormClass('edit', BigMenuForm::class);
+  \Drupal::service(BigmenuHooks::class)->entityTypeAlter($entity_types);
 }
diff --git a/bigmenu.post_update.php b/bigmenu.post_update.php
index 94bfce4..d7e26ad 100644
--- a/bigmenu.post_update.php
+++ b/bigmenu.post_update.php
@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Component\Utility\DeprecationHelper;
+
 /**
  * @file
  * The bigmenu post update hook file.
@@ -11,6 +17,6 @@
 function bigmenu_post_update_update_settings() {
   $config = \Drupal::configFactory()->getEditable('bigmenu.settings');
   if ($config->get('max_depth') === NULL) {
-    $config->set('max_depth', 1)->save(TRUE);
+    DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $config->set('max_depth', 1)->save(), fn() => $config->set('max_depth', 1)->save(TRUE));
   }
 }
diff --git a/bigmenu.services.yml b/bigmenu.services.yml
new file mode 100644
index 0000000..c891e3c
--- /dev/null
+++ b/bigmenu.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\bigmenu\Hook\BigmenuHooks:
+    class: Drupal\bigmenu\Hook\BigmenuHooks
+    autowire: true
diff --git a/src/Hook/BigmenuHooks.php b/src/Hook/BigmenuHooks.php
new file mode 100644
index 0000000..0a45a6f
--- /dev/null
+++ b/src/Hook/BigmenuHooks.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\bigmenu\Hook;
+
+use Drupal\bigmenu\BigMenuForm;
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for bigmenu.
+ */
+class BigmenuHooks {
+
+  /**
+   * Implements hook_entity_type_alter().
+   */
+  #[Hook('entity_type_alter')]
+  public static function entityTypeAlter(array &$entity_types) {
+    /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
+    $entity_types['menu']->setFormClass('edit', BigMenuForm::class);
+  }
+
+}
diff --git a/tests/src/Functional/BigMenuSettingsFormTest.php b/tests/src/Functional/BigMenuSettingsFormTest.php
index cb502fd..adfc859 100644
--- a/tests/src/Functional/BigMenuSettingsFormTest.php
+++ b/tests/src/Functional/BigMenuSettingsFormTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\bigmenu\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -9,6 +11,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group bigmenu
  */
+#[Group('bigmenu')]
+#[RunTestsInSeparateProcesses]
 class BigMenuSettingsFormTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/BigMenuUiTest.php b/tests/src/Functional/BigMenuUiTest.php
index f300907..0a2c307 100644
--- a/tests/src/Functional/BigMenuUiTest.php
+++ b/tests/src/Functional/BigMenuUiTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\bigmenu\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Behat\Mink\Exception\ElementNotFoundException;
 use Drupal\menu_link_content\Entity\MenuLinkContent;
 use Drupal\menu_link_content\MenuLinkContentInterface;
@@ -13,6 +15,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group bigmenu
  */
+#[Group('bigmenu')]
+#[RunTestsInSeparateProcesses]
 class BigMenuUiTest extends BrowserTestBase {
 
   /**
