diff --git a/src/EntityReferencesSQLViewManager.php b/src/EntityReferencesSQLViewManager.php
index b61a992..7548a64 100644
--- a/src/EntityReferencesSQLViewManager.php
+++ b/src/EntityReferencesSQLViewManager.php
@@ -173,7 +173,7 @@ class EntityReferencesSQLViewManager {
     return $entity_type_needs_refresh;
   }
 
-  public function refresh(FieldStorageConfig $new_field_storage_config = NULL) {
+  public function refresh(?FieldStorageConfig $new_field_storage_config = NULL) {
     $entity_type_needs_refresh = $this->getRefreshList();
     if ($new_field_storage_config) {
       $settings = $new_field_storage_config->get('settings');
diff --git a/src/Hook/ViewsEntityReferenceHooks.php b/src/Hook/ViewsEntityReferenceHooks.php
new file mode 100644
index 0000000..e9a9115
--- /dev/null
+++ b/src/Hook/ViewsEntityReferenceHooks.php
@@ -0,0 +1,55 @@
+<?php
+
+namespace Drupal\views_entity_reference\Hook;
+
+use Drupal\Core\Url;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for views_entity_reference.
+ */
+class ViewsEntityReferenceHooks
+{
+    /**
+     * Implements hook_cron()
+     */
+    #[Hook('cron')]
+    public function cron()
+    {
+        $view_manager = \Drupal::service('views_entity_reference.sql_view_manager');
+        // Just refresh SQL VIEWS for entity reference fields as necessary
+        // TODO: Use Queue API?
+        $list = $view_manager->refresh();
+    }
+    /**
+     * Implements hook_ENTITY_TYPE_insert()
+     */
+    #[Hook('field_storage_config_insert')]
+    public function fieldStorageConfigInsert(\Drupal\field\Entity\FieldStorageConfig $entity)
+    {
+        if ($entity->get('type') == 'entity_reference') {
+            $view_manager = \Drupal::service('views_entity_reference.sql_view_manager');
+            $list = $view_manager->refresh($entity);
+        }
+    }
+    /**
+     * Implements hook_ENTITY_TYPE_delete()
+     */
+    #[Hook('field_storage_config_delete')]
+    public function fieldStorageConfigDelete(\Drupal\field\Entity\FieldStorageConfig $entity)
+    {
+        if ($entity->get('type') == 'entity_reference') {
+            $view_manager = \Drupal::service('views_entity_reference.sql_view_manager');
+            $list = $view_manager->refresh();
+        }
+    }
+    /**
+     * Implements hook_rebuild()
+     */
+    #[Hook('rebuild')]
+    public function rebuild()
+    {
+        $view_manager = \Drupal::service('views_entity_reference.sql_view_manager');
+        $list = $view_manager->refresh();
+    }
+}
diff --git a/src/Hook/ViewsEntityReferenceViewsHooks.php b/src/Hook/ViewsEntityReferenceViewsHooks.php
new file mode 100644
index 0000000..ba03532
--- /dev/null
+++ b/src/Hook/ViewsEntityReferenceViewsHooks.php
@@ -0,0 +1,96 @@
+<?php
+
+namespace Drupal\views_entity_reference\Hook;
+
+use Drupal\Core\Entity\ContentEntityType;
+use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for views_entity_reference.
+ */
+class ViewsEntityReferenceViewsHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_views_data().
+     */
+    #[Hook('views_data')]
+    public function viewsData()
+    {
+        $data = [
+        ];
+        $entityTypeManager = \Drupal::entityTypeManager();
+        $enabled_entity_references = \Drupal::config('views_entity_reference.settings')->get('enabled_entity_references');
+        if (!empty($enabled_entity_references)) {
+            $enabled_entity_references = array_filter($enabled_entity_references);
+            foreach ($enabled_entity_references as $entity_type_id) {
+                $entity_type = $entityTypeManager->getDefinition($entity_type_id);
+                $view_name = 'entity_references_' . $entity_type_id;
+                $data[$view_name]['table']['group'] = $this->t('Referencing @entity_type_label', [
+                    '@entity_type_label' => $entity_type->getLabel(),
+                ]);
+                $data[$view_name]['target_id'] = [
+                    'title' => $this->t('@entity_type_label ID', [
+                        '@entity_type_label' => $entity_type->getLabel(),
+                    ]),
+                    'help' => $this->t('Entity ID of referenced @entity_type_label entity.', [
+                        '@entity_type_label' => $entity_type->getLabel(),
+                    ]),
+                    'field' => [
+                        'id' => 'standard',
+                    ],
+                ];
+                $data[$view_name]['entity_id'] = [
+                    'title' => $this->t('Entity ID'),
+                    'help' => $this->t('Entity ID of referencing entity.'),
+                    'field' => [
+                        'id' => 'standard',
+                    ],
+                ];
+                $data[$view_name]['entity_type'] = [
+                    'title' => $this->t('Entity type'),
+                    'help' => $this->t('Entity type of referencing entity.'),
+                    'field' => [
+                        'id' => 'standard',
+                    ],
+                    'filter' => [
+                        'id' => 'views_entity_reference_entity_type',
+                    ],
+                ];
+                $data[$view_name]['bundle'] = [
+                    'title' => $this->t('Entity bundle'),
+                    'help' => $this->t('Entity bundle of referencing entity.'),
+                    'field' => [
+                        'id' => 'standard',
+                    ],
+                    'filter' => [
+                        'id' => 'views_entity_reference_entity_type_bundle',
+                    ],
+                ];
+                $data[$view_name]['table']['join']['media_field_data'] = [
+                    'left_table' => 'media_field_data',
+                    'left_field' => 'mid',
+                    'field' => 'target_id',
+                ];
+                $data[$view_name]['entity_view_url'] = [
+                    'title' => $this->t('Referencing entity URL'),
+                    'help' => $this->t('Referencing entity URL'),
+                    'field' => [
+                        'id' => 'referencing_entity_url',
+                    ],
+                    'sort' => [
+                        'id' => 'standard',
+                    ],
+                    'filter' => [
+                        'id' => 'string',
+                    ],
+                    'argument' => [
+                        'id' => 'string',
+                    ],
+                ];
+            }
+        }
+        return $data;
+    }
+}
diff --git a/src/Plugin/views/field/ReferencingEntityURL.php b/src/Plugin/views/field/ReferencingEntityURL.php
index 6771831..b6e8014 100644
--- a/src/Plugin/views/field/ReferencingEntityURL.php
+++ b/src/Plugin/views/field/ReferencingEntityURL.php
@@ -20,7 +20,7 @@ class ReferencingEntityURL extends Standard {
   /**
    * {@inheritdoc}
    */
-  public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
+  public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
     parent::init($view, $display, $options);
 
     $this->additional_fields['entity_id'] = 'entity_id';
diff --git a/src/Plugin/views/filter/EntityType.php b/src/Plugin/views/filter/EntityType.php
index bb3bc81..e6876eb 100644
--- a/src/Plugin/views/filter/EntityType.php
+++ b/src/Plugin/views/filter/EntityType.php
@@ -60,7 +60,7 @@ class EntityType extends InOperator {
   /**
    * {@inheritdoc}
    */
-  public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
+  public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
     parent::init($view, $display, $options);
   }
 
diff --git a/src/Plugin/views/filter/EntityTypeBundle.php b/src/Plugin/views/filter/EntityTypeBundle.php
index 2126768..55b5a60 100644
--- a/src/Plugin/views/filter/EntityTypeBundle.php
+++ b/src/Plugin/views/filter/EntityTypeBundle.php
@@ -60,7 +60,7 @@ class EntityTypeBundle extends InOperator {
   /**
    * {@inheritdoc}
    */
-  public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
+  public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
     parent::init($view, $display, $options);
   }
 
diff --git a/src/Plugin/views/row/ReferencingEntity.php b/src/Plugin/views/row/ReferencingEntity.php
index 5175f9d..92bd88c 100644
--- a/src/Plugin/views/row/ReferencingEntity.php
+++ b/src/Plugin/views/row/ReferencingEntity.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\views_entity_reference\Plugin\views\row;
 
+use Drupal\Component\Utility\DeprecationHelper;
 use Drupal\views\Views;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\views\Plugin\views\row\RowPluginBase;
@@ -41,7 +42,7 @@ class ReferencingEntity extends RowPluginBase {
     $relationships = $this->view->getDisplay()->getOption('relationships');
 
     foreach ($relationships as $relationship) {
-      $relationship_handler = Views::handlerManager('relationship')->getHandler($relationship);
+      $relationship_handler = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => \Drupal::service('plugin.manager.views.relationship'), fn() => Views::handlerManager('relationship'))->getHandler($relationship);
       if ($relationship_handler instanceof ReferencingEntitiesRelationship) {
         // If this relationship is valid for this type, add it to the list.
         //$data = Views::viewsData()->get($relationship['table']);
diff --git a/views_entity_reference.module b/views_entity_reference.module
index 8508adb..df06346 100644
--- a/views_entity_reference.module
+++ b/views_entity_reference.module
@@ -1,42 +1,40 @@
 <?php
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\views_entity_reference\Hook\ViewsEntityReferenceHooks;
 use Drupal\Core\Url;
 use Drupal\field\Entity\FieldStorageConfig;
 
 /**
  * Implements hook_cron()
  */
-function views_entity_reference_cron() {
-  $view_manager = Drupal::service('views_entity_reference.sql_view_manager');
-  // Just refresh SQL VIEWS for entity reference fields as necessary
-  // TODO: Use Queue API?
-  $list = $view_manager->refresh();
+#[LegacyHook]
+function views_entity_reference_cron()
+{
+    \Drupal::service(ViewsEntityReferenceHooks::class)->cron();
 }
 
 /**
  * Implements hook_ENTITY_TYPE_insert()
  */
+#[LegacyHook]
 function views_entity_reference_field_storage_config_insert(FieldStorageConfig $entity) {
-  if ($entity->get('type') == 'entity_reference') {
-    $view_manager = Drupal::service('views_entity_reference.sql_view_manager');
-    $list = $view_manager->refresh($entity);
-  }
+  \Drupal::service(ViewsEntityReferenceHooks::class)->fieldStorageConfigInsert($entity);
 }
 
 /**
  * Implements hook_ENTITY_TYPE_delete()
  */
+#[LegacyHook]
 function views_entity_reference_field_storage_config_delete(FieldStorageConfig $entity) {
-  if ($entity->get('type') == 'entity_reference') {
-    $view_manager = Drupal::service('views_entity_reference.sql_view_manager');
-    $list = $view_manager->refresh();
-  }
+  \Drupal::service(ViewsEntityReferenceHooks::class)->fieldStorageConfigDelete($entity);
 }
 
 /**
  * Implements hook_rebuild()
  */
-function views_entity_reference_rebuild() {
-  $view_manager = Drupal::service('views_entity_reference.sql_view_manager');
-  $list = $view_manager->refresh();
+#[LegacyHook]
+function views_entity_reference_rebuild()
+{
+    \Drupal::service(ViewsEntityReferenceHooks::class)->rebuild();
 }
diff --git a/views_entity_reference.services.yml b/views_entity_reference.services.yml
index 0aaeadc..5a349bb 100644
--- a/views_entity_reference.services.yml
+++ b/views_entity_reference.services.yml
@@ -1,4 +1,11 @@
 services:
   views_entity_reference.sql_view_manager:
     class: Drupal\views_entity_reference\EntityReferencesSQLViewManager
-    arguments: ['@database']
\ No newline at end of file
+    arguments: ['@database']
+  Drupal\views_entity_reference\Hook\ViewsEntityReferenceHooks:
+    class: Drupal\views_entity_reference\Hook\ViewsEntityReferenceHooks
+    autowire: true
+
+  Drupal\views_entity_reference\Hook\ViewsEntityReferenceViewsHooks:
+    class: Drupal\views_entity_reference\Hook\ViewsEntityReferenceViewsHooks
+    autowire: true
diff --git a/views_entity_reference.views.inc b/views_entity_reference.views.inc
index 381ede5..9d6605d 100644
--- a/views_entity_reference.views.inc
+++ b/views_entity_reference.views.inc
@@ -1,81 +1,15 @@
 <?php
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\views_entity_reference\Hook\ViewsEntityReferenceViewsHooks;
 use Drupal\Core\Entity\ContentEntityType;
 use Drupal\Core\Entity\ContentEntityInterface;
 
 /**
  * Implements hook_views_data().
  */
-function views_entity_reference_views_data() {
-  $data = [];
-
-  $entityTypeManager =  \Drupal::entityTypeManager();
-  $enabled_entity_references = \Drupal::config('views_entity_reference.settings')->get('enabled_entity_references');
-  if (!empty($enabled_entity_references)) {
-    $enabled_entity_references = array_filter($enabled_entity_references);
-    foreach ($enabled_entity_references as $entity_type_id) {
-      $entity_type = $entityTypeManager->getDefinition($entity_type_id);
-      $view_name = 'entity_references_' . $entity_type_id;
-      $data[$view_name]['table']['group'] = t('Referencing @entity_type_label',  ['@entity_type_label' => $entity_type->getLabel()]);
-      $data[$view_name]['target_id'] = [
-        'title' => t('@entity_type_label ID', ['@entity_type_label' => $entity_type->getLabel()]),
-        'help' => t('Entity ID of referenced @entity_type_label entity.', ['@entity_type_label' => $entity_type->getLabel()]),
-        'field' => [
-          'id' => 'standard',
-        ],
-      ];
-      $data[$view_name]['entity_id'] = [
-        'title' => t('Entity ID'),
-        'help' => t('Entity ID of referencing entity.'),
-        'field' => [
-          'id' => 'standard',
-        ]
-      ];
-      $data[$view_name]['entity_type'] = [
-        'title' => t('Entity type'),
-        'help' => t('Entity type of referencing entity.'),
-        'field' => [
-          'id' => 'standard',
-        ],
-        'filter' => [
-          'id' => 'views_entity_reference_entity_type',
-        ],
-      ];
-      $data[$view_name]['bundle'] = [
-        'title' => t('Entity bundle'),
-        'help' => t('Entity bundle of referencing entity.'),
-        'field' => [
-          'id' => 'standard',
-        ],
-        'filter' => [
-          'id' => 'views_entity_reference_entity_type_bundle',
-        ],
-      ];
-
-      $data[$view_name]['table']['join']['media_field_data'] = [
-        'left_table' => 'media_field_data',
-        'left_field' => 'mid',
-        'field' => 'target_id',
-      ];
-
-      $data[$view_name]['entity_view_url'] = [
-        'title' => t('Referencing entity URL'),
-        'help' => t('Referencing entity URL'),
-        'field' => [
-          'id' => 'referencing_entity_url',
-        ],
-        'sort' => [
-          'id' => 'standard',
-        ],
-        'filter' => [
-          'id' => 'string',
-        ],
-        'argument' => [
-          'id' => 'string',
-        ],
-      ];
-    }
-  }
-
-  return $data;
+#[LegacyHook]
+function views_entity_reference_views_data()
+{
+    return \Drupal::service(ViewsEntityReferenceViewsHooks::class)->viewsData();
 }
