diff --git a/composer.json b/composer.json
index 1e0f822..7b0e5b7 100644
--- a/composer.json
+++ b/composer.json
@@ -17,6 +17,6 @@
     "license": "GPL-2.0-or-later",
     "minimum-stability": "dev",
     "require": {
-        "drupal/core": "^8.8 || ^9 || ^10 || ^11"
+        "drupal/core": "^10.1 || ^11 || ^12"
     }
 }
diff --git a/nested_entity_reference_formatter.info.yml b/nested_entity_reference_formatter.info.yml
index 4f269c8..03626ae 100644
--- a/nested_entity_reference_formatter.info.yml
+++ b/nested_entity_reference_formatter.info.yml
@@ -2,4 +2,4 @@ name: Nested Entity Reference Formatter
 type: module
 description: 'Provides a formatter for entity reference fields that allows choosing a nested field and formatter to related entity-reference via ajax'
 package: Fields
-core_version_requirement: ^8.8 || ^9 || ^10 || ^11
+core_version_requirement: ^10.1 || ^11 || ^12
diff --git a/nested_entity_reference_formatter.module b/nested_entity_reference_formatter.module
index ea4d331..13bb21e 100644
--- a/nested_entity_reference_formatter.module
+++ b/nested_entity_reference_formatter.module
@@ -5,18 +5,14 @@
  * Provides hook implementations for the module.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\nested_entity_reference_formatter\Hook\NestedEntityReferenceFormatterHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function nested_entity_reference_formatter_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    case 'help.page.nested_entity_reference_formatter':
-      $output = '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('Provides a formatter for entity reference
-      fields that allows choosing a nested field and formatter to related entity-reference via ajax') . '</p>';
-
-      return $output;
-  }
+  return \Drupal::service(NestedEntityReferenceFormatterHooks::class)->help($route_name, $route_match);
 }
diff --git a/nested_entity_reference_formatter.services.yml b/nested_entity_reference_formatter.services.yml
new file mode 100644
index 0000000..eaef79d
--- /dev/null
+++ b/nested_entity_reference_formatter.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\nested_entity_reference_formatter\Hook\NestedEntityReferenceFormatterHooks:
+    class: Drupal\nested_entity_reference_formatter\Hook\NestedEntityReferenceFormatterHooks
+    autowire: true
diff --git a/src/Hook/NestedEntityReferenceFormatterHooks.php b/src/Hook/NestedEntityReferenceFormatterHooks.php
new file mode 100644
index 0000000..ddcce61
--- /dev/null
+++ b/src/Hook/NestedEntityReferenceFormatterHooks.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Drupal\nested_entity_reference_formatter\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for nested_entity_reference_formatter.
+ */
+class NestedEntityReferenceFormatterHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_help().
+   */
+  #[Hook('help')]
+  public function help($route_name, RouteMatchInterface $route_match) {
+    switch ($route_name) {
+      case 'help.page.nested_entity_reference_formatter':
+        $output = '<h3>' . $this->t('About') . '</h3>';
+        $output .= '<p>' . $this->t('Provides a formatter for entity reference
+      fields that allows choosing a nested field and formatter to related entity-reference via ajax') . '</p>';
+        return $output;
+    }
+  }
+
+}
