diff --git a/composer.json b/composer.json
index 2016cc1..f038d7f 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
   "type": "drupal-module",
   "homepage": "https://www.drupal.org/project/pluginreference",
   "require": {
-    "drupal/core": "^10.3 || ^11"
+    "drupal/core": "^10.3 || ^11 || ^12"
   },
   "authors": [
     {
diff --git a/pluginreference.info.yml b/pluginreference.info.yml
index c458b8e..7070b68 100644
--- a/pluginreference.info.yml
+++ b/pluginreference.info.yml
@@ -1,7 +1,7 @@
 name: Plugin Reference
 type: module
 description: Provides a field that stores a soft reference to a plugin
-core_version_requirement: ^10.3 || ^11
+core_version_requirement: ^10.3 || ^11 || ^12
 package: Field types
 dependencies:
   - drupal:field
diff --git a/pluginreference.module b/pluginreference.module
index 1673650..36c2fa6 100644
--- a/pluginreference.module
+++ b/pluginreference.module
@@ -5,26 +5,22 @@
  * Provides a field that stores a soft reference to a plugin.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\pluginreference\Hook\PluginreferenceHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function pluginreference_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    // Main module help for the pluginreference module.
-    case 'help.page.pluginreference':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('This module simply provides a "Plugin reference" field that allows to create soft references to plugins.') . '</p>';
-      return $output;
-  }
+  return \Drupal::service(PluginreferenceHooks::class)->help($route_name, $route_match);
 }
 
 /**
  * Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.
  */
+#[LegacyHook]
 function pluginreference_form_field_ui_field_storage_add_form_alter(array &$form) {
-  unset($form['add']['new_storage_type']['#options']['plugin_reference']['plugin_reference']);
-  $form['add']['new_storage_type']['#options']['plugin_reference']['plugin_reference'] = t('Other…');
+  \Drupal::service(PluginreferenceHooks::class)->formFieldUiFieldStorageAddFormAlter($form);
 }
diff --git a/pluginreference.services.yml b/pluginreference.services.yml
index d17f134..a3bfa98 100644
--- a/pluginreference.services.yml
+++ b/pluginreference.services.yml
@@ -5,3 +5,7 @@ services:
   plugin_reference.plugin_type_helper:
     class: \Drupal\pluginreference\PluginTypeHelper
     arguments: ['@service_container', '@extension.list.module']
+
+  Drupal\pluginreference\Hook\PluginreferenceHooks:
+    class: Drupal\pluginreference\Hook\PluginreferenceHooks
+    autowire: true
diff --git a/src/Hook/PluginreferenceHooks.php b/src/Hook/PluginreferenceHooks.php
new file mode 100644
index 0000000..2eb9c66
--- /dev/null
+++ b/src/Hook/PluginreferenceHooks.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\pluginreference\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for pluginreference.
+ */
+class PluginreferenceHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_help().
+   */
+  #[Hook('help')]
+  public function help($route_name, RouteMatchInterface $route_match) {
+    switch ($route_name) {
+      // Main module help for the pluginreference module.
+      case 'help.page.pluginreference':
+        $output = '';
+        $output .= '<h3>' . $this->t('About') . '</h3>';
+        $output .= '<p>' . $this->t('This module simply provides a "Plugin reference" field that allows to create soft references to plugins.') . '</p>';
+        return $output;
+    }
+  }
+
+  /**
+   * Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.
+   */
+  #[Hook('form_field_ui_field_storage_add_form_alter')]
+  public function formFieldUiFieldStorageAddFormAlter(array &$form) {
+    unset($form['add']['new_storage_type']['#options']['plugin_reference']['plugin_reference']);
+    $form['add']['new_storage_type']['#options']['plugin_reference']['plugin_reference'] = $this->t('Other…');
+  }
+
+}
diff --git a/tests/src/Functional/Update/PluginReferenceUpdate9001.php b/tests/src/Functional/Update/PluginReferenceUpdate9001.php
index 467e411..8a9e2c4 100644
--- a/tests/src/Functional/Update/PluginReferenceUpdate9001.php
+++ b/tests/src/Functional/Update/PluginReferenceUpdate9001.php
@@ -2,14 +2,15 @@
 
 namespace Drupal\Tests\pluginreference\Functional\Update;
 
+use PHPUnit\Framework\Attributes\IgnoreDeprecations;
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
 
 /**
  * Update test that checks if the value property is converted to plugin_id.
  *
  * @group pluginreference
- * @group legacy
  */
+#[IgnoreDeprecations]
 class PluginReferenceUpdate9001 extends UpdatePathTestBase {
 
   /**
