diff --git a/src/EventSubscriber/OrderCompleteSubscriber.php b/src/EventSubscriber/OrderCompleteSubscriber.php
index d97a458..bb9a6ec 100644
--- a/src/EventSubscriber/OrderCompleteSubscriber.php
+++ b/src/EventSubscriber/OrderCompleteSubscriber.php
@@ -30,7 +30,7 @@ class OrderCompleteSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events['commerce_order.place.post_transition'] = ['orderCompleteHandler'];
 
     return $events;
diff --git a/src/Hook/Requirements.php b/src/Hook/Requirements.php
index 21e0153..c118722 100644
--- a/src/Hook/Requirements.php
+++ b/src/Hook/Requirements.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\syncloud\Hook;
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
 use Drupal\Component\Serialization\Json;
 use Drupal\Core\Render\Markup;
 use GuzzleHttp\Client;
@@ -55,7 +57,7 @@ class Requirements {
           'syncloud_login_pass' => [
             'title' => t('Syncloud: public login/pass'),
             'value' => Markup::create($msg),
-            'severity' => REQUIREMENT_ERROR,
+            'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Error, fn() => REQUIREMENT_ERROR),
           ],
         ];
       }
diff --git a/src/Hook/SyncloudHooks.php b/src/Hook/SyncloudHooks.php
new file mode 100644
index 0000000..df417d1
--- /dev/null
+++ b/src/Hook/SyncloudHooks.php
@@ -0,0 +1,48 @@
+<?php
+
+namespace Drupal\syncloud\Hook;
+
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for syncloud.
+ */
+class SyncloudHooks {
+
+  /**
+   * Implements hook_page_attachments().
+   */
+  #[Hook('page_attachments')]
+  public function pageAttachments(array &$page) {
+    PageAttachments::hook($page);
+  }
+
+  /**
+   * Implements hook_theme().
+   */
+  #[Hook('theme')]
+  public function theme() {
+    return [
+      'syn' => [
+        'render element' => 'elements',
+      ],
+    ];
+  }
+
+  /**
+   * Implements hook_ENTITY_TYPE_insert().
+   */
+  #[Hook('webform_submission_insert')]
+  public function webformSubmissionInsert($entity) {
+    WebformSubmissionInsert::hook($entity, TRUE);
+  }
+
+  /**
+   * Implements hook_ENTITY_TYPE_presave().
+   */
+  #[Hook('webform_submission_presave')]
+  public function webformSubmissionPresave($entity) {
+    WebformSubmissionPresave::hook($entity, TRUE);
+  }
+
+}
diff --git a/syncloud.module b/syncloud.module
index 13991b1..368c790 100644
--- a/syncloud.module
+++ b/syncloud.module
@@ -5,16 +5,13 @@
  * Module syncloud.module.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\syncloud\Hook\SyncloudHooks;
 use Drupal\Core\Render\Element;
 use Drupal\syncloud\Hook\ContactMessageInsert;
 use Drupal\syncloud\Hook\MailAlter;
-use Drupal\syncloud\Hook\WebformSubmissionInsert;
-use Drupal\syncloud\Hook\WebformSubmissionPresave;
-use Drupal\Component\Utility\Crypt;
 use Drupal\syncloud\Hook\Cron;
 use Drupal\syncloud\Hook\Requirements;
-use Drupal\syncloud\Hook\PageAttachments;
-
 
 /**
  * Implements hook_requirements().
@@ -26,19 +23,17 @@ function syncloud_requirements($phase) {
 /**
  * Implements hook_page_attachments().
  */
+#[LegacyHook]
 function syncloud_page_attachments(array &$page) {
-  PageAttachments::hook($page);
+  \Drupal::service(SyncloudHooks::class)->pageAttachments($page);
 }
 
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function syncloud_theme() {
-  return [
-    'syn' => [
-      'render element' => 'elements',
-    ],
-  ];
+  return \Drupal::service(SyncloudHooks::class)->theme();
 }
 
 /**
@@ -68,15 +63,17 @@ function syncloud_contact_message_insert($entity) {
 /**
  * Implements hook_ENTITY_TYPE_insert().
  */
+#[LegacyHook]
 function syncloud_webform_submission_insert($entity) {
-  WebformSubmissionInsert::hook($entity, TRUE);
+  \Drupal::service(SyncloudHooks::class)->webformSubmissionInsert($entity);
 }
 
 /**
  * Implements hook_ENTITY_TYPE_presave().
  */
+#[LegacyHook]
 function syncloud_webform_submission_presave($entity) {
-  WebformSubmissionPresave::hook($entity, TRUE);
+  \Drupal::service(SyncloudHooks::class)->webformSubmissionPresave($entity);
 }
 
 /**
diff --git a/syncloud.services.yml b/syncloud.services.yml
index 058d84b..f552fcc 100644
--- a/syncloud.services.yml
+++ b/syncloud.services.yml
@@ -11,3 +11,7 @@ services:
     arguments: ["@entity_type.manager"]
     tags:
       - { name: event_subscriber }
+
+  Drupal\syncloud\Hook\SyncloudHooks:
+    class: Drupal\syncloud\Hook\SyncloudHooks
+    autowire: true
