diff --git a/modules/paragraphs_inline_entity_form_example/paragraphs_inline_entity_form_example.info.yml b/modules/paragraphs_inline_entity_form_example/paragraphs_inline_entity_form_example.info.yml
index 1f39dfb..611e82e 100644
--- a/modules/paragraphs_inline_entity_form_example/paragraphs_inline_entity_form_example.info.yml
+++ b/modules/paragraphs_inline_entity_form_example/paragraphs_inline_entity_form_example.info.yml
@@ -1,7 +1,7 @@
 name: Paragraphs Inline Entity Form Example
 type: module
 description: 'Provides Test scaffolds for Paragraphs Inline Entity Form Test module.'
-core_version_requirement: ^9 || ^10 || ^11
+core_version_requirement: ^10.1 || ^11 || ^12
 package: Paragraphs
 dependencies:
   - drupal:node
diff --git a/paragraphs_inline_entity_form.info.yml b/paragraphs_inline_entity_form.info.yml
index 20b153c..c882853 100644
--- a/paragraphs_inline_entity_form.info.yml
+++ b/paragraphs_inline_entity_form.info.yml
@@ -1,7 +1,7 @@
 name: Paragraphs Inline Entity Form
 type: module
 description: 'Paragraphs selector for Entity Browser and integration with Entity Embed Wysiwyg'
-core_version_requirement: ^9.5 || ^10 || ^11
+core_version_requirement: ^10.1 || ^11 || ^12
 package: Paragraphs
 dependencies:
   - drupal:ckeditor5
diff --git a/paragraphs_inline_entity_form.module b/paragraphs_inline_entity_form.module
index 87a2dc0..fe2a0b8 100644
--- a/paragraphs_inline_entity_form.module
+++ b/paragraphs_inline_entity_form.module
@@ -5,54 +5,17 @@
  * Module.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\paragraphs_inline_entity_form\Hook\ParagraphsInlineEntityFormHooks;
 use Drupal\Core\Entity\ContentEntityInterface;
-use Drupal\Core\Entity\EntityFormInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Url;
-use Drupal\entity_embed\Form\EntityEmbedDialog;
 
 /**
  * Implements hook_form_alter().
  */
+#[LegacyHook]
 function paragraphs_inline_entity_form_form_alter(&$form, FormStateInterface $form_state): void {
-  /** @var Drupal\Core\Entity\FieldableEntityInterface $entity */
-  $formObject = $form_state->getFormObject();
-  if ($formObject instanceof EntityFormInterface) {
-    $form['#attached']['library'][] = 'paragraphs_inline_entity_form/dialog';
-  }
-
-  if ($formObject instanceof EntityEmbedDialog) {
-    if (paragraphs_inline_entity_form_entity_browser_is_paragraph_item($form)) {
-      $form['#attached']['library'][] = 'paragraphs_inline_entity_form/dialog';
-      switch ($form_state->get('step')) {
-        case 'select':
-          // Do nothing.
-          break;
-
-        case 'embed':
-          // Change the back button to link to the paragraph edit form.
-          $entity_uuid = $form['attributes']['data-entity-uuid']['#value'];
-          $entity_type_manager = \Drupal::service('entity_type.manager');
-          $entity = $entity_type_manager->getStorage('paragraph')
-            ->loadByProperties(['uuid' => $entity_uuid]);
-          $paragraph = current($entity);
-
-          $form['actions']['back'] = [
-            '#type' => 'submit',
-            '#value' => t('Edit paragraph'),
-            '#submit' => [],
-            '#ajax' => [
-              'url' => Url::fromRoute('entity_browser.edit_form', [
-                'entity_type' => 'paragraph',
-                'entity' => $paragraph->id(),
-              ]),
-              'event' => 'click',
-            ],
-          ];
-          break;
-      }
-    }
-  }
+  \Drupal::service(ParagraphsInlineEntityFormHooks::class)->formAlter($form, $form_state);
 }
 
 /**
@@ -80,7 +43,7 @@ function paragraphs_inline_entity_form_entity_browser_is_paragraph_item(array $f
 /**
  * Implements hook_entity_embed_values_alter().
  */
+#[LegacyHook]
 function paragraphs_inline_entity_form_entity_embed_values_alter(array &$values, ContentEntityInterface $entity): void {
-  // Add dummy value to trigger a refresh of the embedded content preview.
-  $values['attributes']['alt'] = $values['attributes']['data-entity-uuid'];
+  \Drupal::service(ParagraphsInlineEntityFormHooks::class)->entityEmbedValuesAlter($values, $entity);
 }
diff --git a/paragraphs_inline_entity_form.services.yml b/paragraphs_inline_entity_form.services.yml
new file mode 100644
index 0000000..608c946
--- /dev/null
+++ b/paragraphs_inline_entity_form.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\paragraphs_inline_entity_form\Hook\ParagraphsInlineEntityFormHooks:
+    class: Drupal\paragraphs_inline_entity_form\Hook\ParagraphsInlineEntityFormHooks
+    autowire: true
diff --git a/src/Hook/ParagraphsInlineEntityFormHooks.php b/src/Hook/ParagraphsInlineEntityFormHooks.php
new file mode 100644
index 0000000..f8069b1
--- /dev/null
+++ b/src/Hook/ParagraphsInlineEntityFormHooks.php
@@ -0,0 +1,72 @@
+<?php
+
+namespace Drupal\paragraphs_inline_entity_form\Hook;
+
+use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Url;
+use Drupal\entity_embed\Form\EntityEmbedDialog;
+use Drupal\Core\Entity\EntityFormInterface;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for paragraphs_inline_entity_form.
+ */
+class ParagraphsInlineEntityFormHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_form_alter().
+   */
+  #[Hook('form_alter')]
+  public function formAlter(&$form, FormStateInterface $form_state): void {
+    /** @var Drupal\Core\Entity\FieldableEntityInterface $entity */
+    $formObject = $form_state->getFormObject();
+    if ($formObject instanceof EntityFormInterface) {
+      $form['#attached']['library'][] = 'paragraphs_inline_entity_form/dialog';
+    }
+    if ($formObject instanceof EntityEmbedDialog) {
+      if (paragraphs_inline_entity_form_entity_browser_is_paragraph_item($form)) {
+        $form['#attached']['library'][] = 'paragraphs_inline_entity_form/dialog';
+        switch ($form_state->get('step')) {
+          case 'select':
+            // Do nothing.
+            break;
+
+          case 'embed':
+            // Change the back button to link to the paragraph edit form.
+            $entity_uuid = $form['attributes']['data-entity-uuid']['#value'];
+            $entity_type_manager = \Drupal::service('entity_type.manager');
+            $entity = $entity_type_manager->getStorage('paragraph')->loadByProperties([
+              'uuid' => $entity_uuid,
+            ]);
+            $paragraph = current($entity);
+            $form['actions']['back'] = [
+              '#type' => 'submit',
+              '#value' => $this->t('Edit paragraph'),
+              '#submit' => [],
+              '#ajax' => [
+                'url' => Url::fromRoute('entity_browser.edit_form', [
+                  'entity_type' => 'paragraph',
+                  'entity' => $paragraph->id(),
+                ]),
+                'event' => 'click',
+              ],
+            ];
+            break;
+        }
+      }
+    }
+  }
+
+  /**
+   * Implements hook_entity_embed_values_alter().
+   */
+  #[Hook('entity_embed_values_alter')]
+  public static function entityEmbedValuesAlter(array &$values, ContentEntityInterface $entity): void {
+    // Add dummy value to trigger a refresh of the embedded content preview.
+    $values['attributes']['alt'] = $values['attributes']['data-entity-uuid'];
+  }
+
+}
diff --git a/tests/src/Functional/ParagraphsIEFTests.php b/tests/src/Functional/ParagraphsIEFTests.php
index 531e650..716311f 100644
--- a/tests/src/Functional/ParagraphsIEFTests.php
+++ b/tests/src/Functional/ParagraphsIEFTests.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\paragraphs_inline_entity_form\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -11,6 +13,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @package Drupal\Tests\paragraphs_inline_entity_form\Functional
  */
+#[Group('paragraphs_inline_entity_form')]
+#[RunTestsInSeparateProcesses]
 class ParagraphsIEFTests extends BrowserTestBase {
 
   /**
@@ -32,7 +36,7 @@ class ParagraphsIEFTests extends BrowserTestBase {
     'paragraphs',
     'inline_entity_form',
     'paragraphs_inline_entity_form',
-    'paragraphs_inline_entity_form_example'
+    'paragraphs_inline_entity_form_example',
   ];
 
   /**
@@ -58,4 +62,5 @@ class ParagraphsIEFTests extends BrowserTestBase {
   public function testAdminUI(): void {
     $this->drupalLogin($this->adminUser);
   }
+
 }
