diff --git a/datatables.install b/datatables.install
index e669405..2b2375f 100644
--- a/datatables.install
+++ b/datatables.install
@@ -5,6 +5,7 @@
  * Install file.
  */
 
+use Drupal\Component\Utility\DeprecationHelper;
 use Drupal\Core\Extension\Requirement\RequirementSeverity;
 
 /**
@@ -34,7 +35,7 @@ function datatables_requirements($phase) {
         $requirements['datatables_assets'] = [
           'title' => t('DataTables Assets'),
           'value' => t('Missing assets or incompatible version'),
-          'severity' => REQUIREMENT_ERROR,
+          'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Error, fn() => REQUIREMENT_ERROR),
           'description' => t('The DataTables plugin library is not installed properly. Please refer to the README file of the DataTables module for installation instructions.'),
         ];
         return $requirements;
@@ -72,7 +73,7 @@ function datatables_requirements($phase) {
         $requirements['datatables_assets'] = [
           'title' => t('DataTables Assets'),
           'value' => t('Missing assets or incompatible version'),
-          'severity' => REQUIREMENT_OK,
+          'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::OK, fn() => REQUIREMENT_OK),
           'description' => t('The essential DataTables CSS and JavaScript files are present and version is compatible.'),
         ];
       }
@@ -91,7 +92,7 @@ function datatables_requirements($phase) {
         $requirements['datatables_assets'] = [
           'title' => t('DataTables Assets'),
           'value' => t('Missing assets or incompatible version'),
-          'severity' => REQUIREMENT_ERROR,
+          'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Error, fn() => REQUIREMENT_ERROR),
           'description' => implode('. ', $message),
         ];
       }
diff --git a/datatables.module b/datatables.module
index d25c810..3ea60d7 100644
--- a/datatables.module
+++ b/datatables.module
@@ -5,6 +5,8 @@
  * Provides Views integration for the jQuery DataTables plugin.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\datatables\Hook\DatatablesHooks;
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -12,18 +14,9 @@ use Drupal\field\Entity\FieldStorageConfig;
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function datatables_theme($existing, $type, $theme, $path) {
-  return [
-    'datatable' => [
-      'variables' => [
-        'header' => NULL,
-        'rows' => NULL,
-        'attributes' => NULL,
-        'caption' => NULL,
-      ],
-      'file' => 'datatables.theme.inc',
-    ],
-  ];
+  return \Drupal::service(DatatablesHooks::class)->theme($existing, $type, $theme, $path);
 }
 
 /**
@@ -252,60 +245,15 @@ function template_preprocess_views_view_datatables(&$variables) {
 /**
  * Implements hook_library_info_alter().
  */
+#[LegacyHook]
 function datatables_library_info_alter(&$libraries, $extension): void {
-  if ($extension === 'datatables') {
-    $config = \Drupal::config('datatables.settings');
-
-    // Use CDN as source for the library files, if the user picked that.
-    if ($config->get('use_cdn')) {
-      $libraries['datatables_core']['js'] = [
-        'https://cdn.datatables.net/2.3.8/js/dataTables.min.js' => [
-          'type' => 'external',
-        ],
-      ];
-
-      $libraries['datatables_core']['css']['theme'] = [
-        'https://cdn.datatables.net/2.3.8/css/dataTables.dataTables.min.css' => [
-          'type' => 'external',
-        ],
-      ];
-    }
-  }
+  \Drupal::service(DatatablesHooks::class)->libraryInfoAlter($libraries, $extension);
 }
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function datatables_help($route_name, RouteMatchInterface $route_match): string|\Stringable|array|null {
-  switch ($route_name) {
-    case 'help.page.datatables':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The DataTables module integrates the <a href=":url">DataTables</a> plugin with Drupal Views.',
-          [':url' => 'https://datatables.net']) . '</p>';
-      $output .= '<p>' . t('You can check examples on the <a href=":url">DataTables index page</a>.',
-          [':url' => 'https://datatables.net/examples/index']) . '</p>';
-      $output .= '<h3>' . t('Requirements') . '</h3>';
-      $output .= '<dl>';
-      $output .= '<dt>' . t('Manual Installation') . '</dt>';
-      $output .= '<dd>' . t('You can download and install the DataTables library manually into your libraries folder.') . '</dd>';
-      $output .= '<dt>' . t('CDN') . '</dt>';
-      $output .= '<dd>' . t('Go to DataTables administration pages (link below) and pick the CDN option.') . '</dd>';
-
-      $output .= '</dl>';
-      $output .= '<p>' . t('For more detailed instructions, please check the <code>README.md</code> file inside the module directory or visit the <a href=":url">DataTables project page</a> on Drupal.org.', [
-        ':url' => 'https://www.drupal.org/project/datatables',
-      ]) . '</p>';
-
-      $output .= '<h3>' . t('Uses') . '</h3>';
-      $output .= '<dl>';
-      $output .= '<dt>' . t('Configuring Views') . '</dt>';
-      $output .= '<dd>' . t('Create a View and select "DataTables" as the display format, and add some fields to start using the library.') . '</dd>';
-      $output .= '</dl>';
-
-      return $output;
-
-    default:
-      return NULL;
-  }
+  return \Drupal::service(DatatablesHooks::class)->help($route_name, $route_match);
 }
diff --git a/datatables.services.yml b/datatables.services.yml
new file mode 100644
index 0000000..d5ac71d
--- /dev/null
+++ b/datatables.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\datatables\Hook\DatatablesHooks:
+    class: Drupal\datatables\Hook\DatatablesHooks
+    autowire: true
diff --git a/datatables.theme.inc b/datatables.theme.inc
index 5f974c6..9235059 100644
--- a/datatables.theme.inc
+++ b/datatables.theme.inc
@@ -5,6 +5,7 @@
  * Preprocessors for DataTable theming.
  */
 
+use Drupal\Component\Utility\DeprecationHelper;
 use Drupal\Component\Utility\Html;
 
 /**
@@ -177,5 +178,9 @@ function template_preprocess_datatable(array &$variables) {
     unset($attributes['datatable_options']);
   }
 
-  template_preprocess_table($variables);
+  DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', function () use (&$variables) {
+      \Drupal::service('Drupal\Core\Theme\ThemePreprocess')->preprocessTable($variables);
+  }, function () use (&$variables) {
+      template_preprocess_table($variables);
+  });
 }
diff --git a/src/Form/DatatablesSettingsForm.php b/src/Form/DatatablesSettingsForm.php
index 54daedb..7b0982a 100644
--- a/src/Form/DatatablesSettingsForm.php
+++ b/src/Form/DatatablesSettingsForm.php
@@ -80,7 +80,7 @@ class DatatablesSettingsForm extends ConfigFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state): void {
     $config = $this->config('datatables.settings');
     $old_value = $config->get('use_cdn');
-    $new_value = (boolean) $form_state->getValue('use_cdn');
+    $new_value = (bool) $form_state->getValue('use_cdn');
 
     if ($old_value !== $new_value) {
       $config->set('use_cdn', $new_value)->save();
diff --git a/src/Hook/DatatablesHooks.php b/src/Hook/DatatablesHooks.php
new file mode 100644
index 0000000..df60c70
--- /dev/null
+++ b/src/Hook/DatatablesHooks.php
@@ -0,0 +1,93 @@
+<?php
+
+namespace Drupal\datatables\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for datatables.
+ */
+class DatatablesHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_theme().
+   */
+  #[Hook('theme')]
+  public static function theme($existing, $type, $theme, $path) {
+    return [
+      'datatable' => [
+        'variables' => [
+          'header' => NULL,
+          'rows' => NULL,
+          'attributes' => NULL,
+          'caption' => NULL,
+        ],
+        'file' => 'datatables.theme.inc',
+      ],
+    ];
+  }
+
+  /**
+   * Implements hook_library_info_alter().
+   */
+  #[Hook('library_info_alter')]
+  public static function libraryInfoAlter(&$libraries, $extension): void {
+    if ($extension === 'datatables') {
+      $config = \Drupal::config('datatables.settings');
+      // Use CDN as source for the library files, if the user picked that.
+      if ($config->get('use_cdn')) {
+        $libraries['datatables_core']['js'] = [
+          'https://cdn.datatables.net/2.3.8/js/dataTables.min.js' => [
+            'type' => 'external',
+          ],
+        ];
+        $libraries['datatables_core']['css']['theme'] = [
+          'https://cdn.datatables.net/2.3.8/css/dataTables.dataTables.min.css' => [
+            'type' => 'external',
+          ],
+        ];
+      }
+    }
+  }
+
+  /**
+   * Implements hook_help().
+   */
+  #[Hook('help')]
+  public function help($route_name, RouteMatchInterface $route_match): string|\Stringable|array|null {
+    switch ($route_name) {
+      case 'help.page.datatables':
+        $output = '';
+        $output .= '<h3>' . $this->t('About') . '</h3>';
+        $output .= '<p>' . $this->t('The DataTables module integrates the <a href=":url">DataTables</a> plugin with Drupal Views.', [
+          ':url' => 'https://datatables.net',
+        ]) . '</p>';
+        $output .= '<p>' . $this->t('You can check examples on the <a href=":url">DataTables index page</a>.', [
+          ':url' => 'https://datatables.net/examples/index',
+        ]) . '</p>';
+        $output .= '<h3>' . $this->t('Requirements') . '</h3>';
+        $output .= '<dl>';
+        $output .= '<dt>' . $this->t('Manual Installation') . '</dt>';
+        $output .= '<dd>' . $this->t('You can download and install the DataTables library manually into your libraries folder.') . '</dd>';
+        $output .= '<dt>' . $this->t('CDN') . '</dt>';
+        $output .= '<dd>' . $this->t('Go to DataTables administration pages (link below) and pick the CDN option.') . '</dd>';
+        $output .= '</dl>';
+        $output .= '<p>' . $this->t('For more detailed instructions, please check the <code>README.md</code> file inside the module directory or visit the <a href=":url">DataTables project page</a> on Drupal.org.', [
+          ':url' => 'https://www.drupal.org/project/datatables',
+        ]) . '</p>';
+        $output .= '<h3>' . $this->t('Uses') . '</h3>';
+        $output .= '<dl>';
+        $output .= '<dt>' . $this->t('Configuring Views') . '</dt>';
+        $output .= '<dd>' . $this->t('Create a View and select "DataTables" as the display format, and add some fields to start using the library.') . '</dd>';
+        $output .= '</dl>';
+        return $output;
+
+      default:
+        return NULL;
+    }
+  }
+
+}
