diff --git a/composer.json b/composer.json
index b26d4da..dfd68a7 100644
--- a/composer.json
+++ b/composer.json
@@ -9,9 +9,9 @@
     },
     "require":{
         "caxy/php-htmldiff": "^0.1.14",
-        "drupal/core": "^10.1 || ^11",
         "drupal/diff": "^2.0",
         "ext-dom": "*",
-        "php": ">=8.1"
+        "php": ">=8.1",
+        "drupal/core": "^10.1 || ^11 || ^12"
     }
 }
diff --git a/diff_plus.info.yml b/diff_plus.info.yml
index d7b4853..8455ca0 100644
--- a/diff_plus.info.yml
+++ b/diff_plus.info.yml
@@ -1,6 +1,6 @@
 name: Diff Plus
 type: module
 description: Provides fairly opinionated expanded functionality for the diff module
-core_version_requirement: ^10.1 || ^11
+core_version_requirement: ^10.1 || ^11 || ^12
 dependencies:
   - diff:diff
diff --git a/diff_plus.module b/diff_plus.module
index b8a44bb..9544298 100644
--- a/diff_plus.module
+++ b/diff_plus.module
@@ -1,5 +1,12 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\diff_plus\Hook\DiffPlusHooks;
+
 /**
  * @file
  * Contains hooks for the module.
@@ -8,24 +15,7 @@
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function diff_plus_theme() {
-  return [
-    'diff_plus_ui' => [
-      'variables' => [
-        'entity' => NULL,
-        'from_revision' => NULL,
-        'to_revision' => NULL,
-        'from_revision_url' => NULL,
-        'to_revision_url' => NULL,
-        'from_revision_author' => NULL,
-        'to_status' => NULL,
-        'from_status' => NULL,
-        'to_revision_author' => NULL,
-        'previous_revision_url' => NULL,
-        'next_revision_url' => NULL,
-        'version_history_url' => NULL,
-        'settings' => NULL,
-      ],
-    ],
-  ];
+  return \Drupal::service(DiffPlusHooks::class)->theme();
 }
diff --git a/diff_plus.services.yml b/diff_plus.services.yml
index 9ed9aad..5ce76e4 100644
--- a/diff_plus.services.yml
+++ b/diff_plus.services.yml
@@ -38,3 +38,7 @@ services:
         ]
     tags:
       - { name: event_subscriber }
+
+  Drupal\diff_plus\Hook\DiffPlusHooks:
+    class: Drupal\diff_plus\Hook\DiffPlusHooks
+    autowire: true
diff --git a/src/Hook/DiffPlusHooks.php b/src/Hook/DiffPlusHooks.php
new file mode 100644
index 0000000..bd4cbee
--- /dev/null
+++ b/src/Hook/DiffPlusHooks.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace Drupal\diff_plus\Hook;
+
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for diff_plus.
+ */
+class DiffPlusHooks {
+  /**
+   * @file
+   * Contains hooks for the module.
+   */
+
+  /**
+   * Implements hook_theme().
+   */
+  #[Hook('theme')]
+  public function theme() {
+    return [
+      'diff_plus_ui' => [
+        'variables' => [
+          'entity' => NULL,
+          'from_revision' => NULL,
+          'to_revision' => NULL,
+          'from_revision_url' => NULL,
+          'to_revision_url' => NULL,
+          'from_revision_author' => NULL,
+          'to_status' => NULL,
+          'from_status' => NULL,
+          'to_revision_author' => NULL,
+          'previous_revision_url' => NULL,
+          'next_revision_url' => NULL,
+          'version_history_url' => NULL,
+          'settings' => NULL,
+        ],
+      ],
+    ];
+  }
+
+}
