diff --git a/feedbacks.info.yml b/feedbacks.info.yml
index a8b2547..ffc1130 100755
--- a/feedbacks.info.yml
+++ b/feedbacks.info.yml
@@ -1,5 +1,5 @@
 name: Feedbacks
 description: 'Allows visitors or site users to report issues/bugs on this site.'
 type: module
-core_version_requirement: '>=8.9 <11 || ^11'
+core_version_requirement: ^10.1 || ^11 || ^12
 package: Development
diff --git a/feedbacks.module b/feedbacks.module
index 9da30f6..d7f8181 100644
--- a/feedbacks.module
+++ b/feedbacks.module
@@ -4,49 +4,25 @@
  * @file
  * Using two hooks to add link to pages and attaching libraries.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\feedbacks\Hook\FeedbacksHooks;
 use Drupal\Core\Url;
 use Drupal\Component\Serialization\Json;
 
 /**
  * Implements hook_page_bottom().
  */
-function feedbacks_page_bottom(array &$page_bottom) {
-
-  if (!\Drupal::currentUser()->hasPermission('use feedback form')) {
-    return;
-  }
-
-  $feedbackBlock = [
-    '#type' => 'container',
-    '#attributes' => [
-      'class' => ['feedback_link bottom'],
-    ],
-    'link' => [
-      '#type' => 'link',
-      '#title' => t('Feedback'),
-      '#url' => Url::fromRoute('feedbacks_add.form'),
-      '#attributes' => [
-        'class' => ['use-ajax'],
-        'data-dialog-type' => 'modal',
-        'data-dialog-options' => Json::encode([
-          'width' => '40%',
-        ]),
-      ],
-    ],
-  ];
-
-  $page_bottom['feedback'] = $feedbackBlock;
-
+#[LegacyHook]
+function feedbacks_page_bottom(array &$page_bottom)
+{
+    \Drupal::service(FeedbacksHooks::class)->pageBottom($page_bottom);
 }
 
 /**
  * Implements hook_page_attachments().
  */
-function feedbacks_page_attachments(array &$attachments) {
-  if (!\Drupal::currentUser()->hasPermission('use feedback form')) {
-    return;
-  }
-  $attachments['#attached']['library'][] = 'feedbacks/feedback-link';
-  $attachments['#attached']['library'][] = 'core/drupal.ajax';
+#[LegacyHook]
+function feedbacks_page_attachments(array &$attachments)
+{
+    \Drupal::service(FeedbacksHooks::class)->pageAttachments($attachments);
 }
diff --git a/feedbacks.services.yml b/feedbacks.services.yml
new file mode 100644
index 0000000..ec12094
--- /dev/null
+++ b/feedbacks.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\feedbacks\Hook\FeedbacksHooks:
+    class: Drupal\feedbacks\Hook\FeedbacksHooks
+    autowire: true
diff --git a/src/Controller/AdminFeedbackController.php b/src/Controller/AdminFeedbackController.php
index 6a11a80..87efea9 100755
--- a/src/Controller/AdminFeedbackController.php
+++ b/src/Controller/AdminFeedbackController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\feedbacks\Controller;
 
+use Drupal\user\Entity\User;
 use Drupal\feedbacks\Form\FeedbackClass;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Link;
@@ -62,7 +63,7 @@ class AdminFeedbackController extends ControllerBase {
         $user = \Drupal::currentUser();
 
         // Load the user entity.
-        $user_entity = \Drupal\user\Entity\User::load($user->id());
+        $user_entity = User::load($user->id());
 
         // Get the user's timezone.
         $timezone = $user_entity->getTimezone();
diff --git a/src/Hook/FeedbacksHooks.php b/src/Hook/FeedbacksHooks.php
new file mode 100644
index 0000000..d3909a7
--- /dev/null
+++ b/src/Hook/FeedbacksHooks.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace Drupal\feedbacks\Hook;
+
+use Drupal\Core\Url;
+use Drupal\Component\Serialization\Json;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for feedbacks.
+ */
+class FeedbacksHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_page_bottom().
+     */
+    #[Hook('page_bottom')]
+    public function pageBottom(array &$page_bottom)
+    {
+        if (!\Drupal::currentUser()->hasPermission('use feedback form')) {
+            return;
+        }
+        $feedbackBlock = [
+            '#type' => 'container',
+            '#attributes' => [
+                'class' => [
+                    'feedback_link bottom',
+                ],
+            ],
+            'link' => [
+                '#type' => 'link',
+                '#title' => $this->t('Feedback'),
+                '#url' => \Drupal\Core\Url::fromRoute('feedbacks_add.form'),
+                '#attributes' => [
+                    'class' => [
+                        'use-ajax',
+                    ],
+                    'data-dialog-type' => 'modal',
+                    'data-dialog-options' => \Drupal\Component\Serialization\Json::encode([
+                        'width' => '40%',
+                    ]),
+                ],
+            ],
+        ];
+        $page_bottom['feedback'] = $feedbackBlock;
+    }
+    /**
+     * Implements hook_page_attachments().
+     */
+    #[Hook('page_attachments')]
+    public function pageAttachments(array &$attachments)
+    {
+        if (!\Drupal::currentUser()->hasPermission('use feedback form')) {
+            return;
+        }
+        $attachments['#attached']['library'][] = 'feedbacks/feedback-link';
+        $attachments['#attached']['library'][] = 'core/drupal.ajax';
+    }
+}
