diff --git a/custom_elements.module b/custom_elements.module
index 5dc91aa..3195671 100644
--- a/custom_elements.module
+++ b/custom_elements.module
@@ -4,7 +4,8 @@
  * @file
  * Custom elements hooks.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\custom_elements\Hook\CustomElementsHooks;
 use Drupal\Component\Render\MarkupInterface;
 use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\Core\Entity\EntityInterface;
@@ -20,30 +21,18 @@ use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function custom_elements_theme() {
-  return [
-    'custom_element' => [
-      'variables' => ['custom_element' => NULL],
-    ],
-    'custom_element__renderless_container' => [
-      'base hook' => 'custom_element',
-    ],
-  ];
+  return \Drupal::service(CustomElementsHooks::class)->theme();
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK().
  */
-function custom_elements_theme_suggestions_custom_element(array $variables) {
-  $suggestions = [];
-  /** @var \Drupal\custom_elements\CustomElement $custom_element */
-  $custom_element = $variables['custom_element'];
-
-  // Add suggestion based on tag name.
-  $tag = str_replace('-', '_', $custom_element->getTag());
-  $suggestions[] = 'custom_element__' . $tag;
-
-  return $suggestions;
+#[LegacyHook]
+function custom_elements_theme_suggestions_custom_element(array $variables)
+{
+    return \Drupal::service(CustomElementsHooks::class)->themeSuggestionsCustomElement($variables);
 }
 
 /**
@@ -177,25 +166,10 @@ function custom_elements_prepare_slots_as_vue_3(CustomElement $custom_element) {
  *
  * @see custom_elements_module_implements_alter()
  */
-function custom_elements_entity_type_alter(array &$entity_types) {
-  // Check if this call is made during layout_builder installation; changing
-  // the entity class would make the loadMultiple() call in
-  // layout_builder_install() fail fatally in that case. This check depends on
-  // ModuleInstaller implementation details, i.e. entity info is
-  // - (re)built before the module (version) is registered
-  // - not rebuilt between registering the module and invoking hook_install.
-  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
-  $layout_builder_module_install_in_progress =
-    $entity_types['entity_view_display']->getClass() === LayoutBuilderEntityViewDisplay::class
-    && \Drupal::service('update.update_hook_registry')->getInstalledVersion('layout_builder')
-       == UpdateHookRegistry::SCHEMA_UNINSTALLED;
-
-  if (!$layout_builder_module_install_in_progress) {
-    // Use the right class depending on layout builder being used.
-    $class = \Drupal::moduleHandler()->moduleExists('layout_builder') ? CustomElementsLayoutBuilderEntityViewDisplay::class : CustomElementsEntityViewDisplay::class;
-    $entity_types['entity_view_display']
-      ->setClass($class);
-  }
+#[LegacyHook]
+function custom_elements_entity_type_alter(array &$entity_types)
+{
+    \Drupal::service(CustomElementsHooks::class)->entityTypeAlter($entity_types);
 }
 
 /**
@@ -228,29 +202,23 @@ function custom_elements_module_implements_alter(&$implementations, $hook) {
  *
  * @see custom_elements_entity_type_alter()
  */
+#[LegacyHook]
 function custom_elements_modules_installed($modules, $is_syncing) {
-  if (in_array('layout_builder', $modules, TRUE)) {
-    // Rebuild info that was not changed yet during installation.
-    \Drupal::entityTypeManager()->clearCachedDefinitions();
-  }
+  \Drupal::service(CustomElementsHooks::class)->modulesInstalled($modules, $is_syncing);
 }
 
 /**
  * Implements hook_entity_view_display_alter().
  */
+#[LegacyHook]
 function custom_elements_entity_view_display_alter(EntityViewDisplayInterface $display, array $context) {
-  // Enable for all view-modes named appropriately by default.
-  if (strpos($context['view_mode'], 'custom_elements') === 0) {
-    $display->setThirdPartySetting('custom_elements', 'enabled', TRUE);
-  }
+  \Drupal::service(CustomElementsHooks::class)->entityViewDisplayAlter($display, $context);
 }
 
 /**
  * Implements hook_entity_view_alter().
  */
+#[LegacyHook]
 function custom_elements_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
-  // Alter the build array to apply custom elements rendering.
-  if (!empty($build['#custom_elements_enabled'])) {
-    $build['#theme'] = 'custom_element';
-  }
+  \Drupal::service(CustomElementsHooks::class)->entityViewAlter($build, $entity, $display);
 }
diff --git a/custom_elements.services.yml b/custom_elements.services.yml
index 8a9214d..44eeacc 100644
--- a/custom_elements.services.yml
+++ b/custom_elements.services.yml
@@ -72,3 +72,7 @@ services:
   custom_elements.render_helper:
     class: Drupal\custom_elements\CustomElementRenderHelper
     arguments: ['@request_stack', '@config.factory']
+
+  Drupal\custom_elements\Hook\CustomElementsHooks:
+    class: Drupal\custom_elements\Hook\CustomElementsHooks
+    autowire: true
diff --git a/modules/custom_elements_ui/custom_elements_ui.module b/modules/custom_elements_ui/custom_elements_ui.module
index dbf2224..8655836 100644
--- a/modules/custom_elements_ui/custom_elements_ui.module
+++ b/modules/custom_elements_ui/custom_elements_ui.module
@@ -4,7 +4,8 @@
  * @file
  * Provides hook implementations for Custom Elements UI.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\custom_elements_ui\Hook\CustomElementsUiHooks;
 use Drupal\Core\Entity\Display\EntityDisplayInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Form\FormStateInterface;
@@ -15,24 +16,10 @@ use Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask;
 /**
  * Implements hook_form_FORM_ID_alter() for \Drupal\field_ui\Form\EntityViewDisplayEditForm.
  */
-function custom_elements_ui_form_entity_view_display_edit_form_alter(&$form, FormStateInterface $form_state) {
-  /** @var \Drupal\Core\Entity\Entity\EntityViewDisplay $display_entity */
-  $display_entity = $form_state->getFormObject()->getEntity();
-  $is_enabled = $display_entity->getThirdPartySetting('custom_elements', 'enabled', FALSE);
-
-  $form['custom_elements'] = [
-    '#type' => 'details',
-    '#open' => TRUE,
-    '#title' => t('Custom Element'),
-    '#tree' => TRUE,
-  ];
-  $form['custom_elements']['enabled'] = [
-    '#type' => 'checkbox',
-    '#title' => t('Force rendering as custom element'),
-    '#default_value' => $is_enabled,
-    '#description' => t('Enable, to always render an entity as custom element. When disabled, the entity is only rendered as custom element whenever a module explicitly asks for it.'),
-  ];
-  $form['#entity_builders'][] = '_custom_elements_ui_entity_view_display_edit_form_builder';
+#[LegacyHook]
+function custom_elements_ui_form_entity_view_display_edit_form_alter(&$form, FormStateInterface $form_state)
+{
+    \Drupal::service(CustomElementsUiHooks::class)->formEntityViewDisplayEditFormAlter($form, $form_state);
 }
 
 /**
@@ -48,41 +35,27 @@ function _custom_elements_ui_entity_view_display_edit_form_builder($entity_type_
 /**
  * Implements hook_entity_type_build().
  */
+#[LegacyHook]
 function custom_elements_ui_entity_type_build(array &$entity_types) {
-  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
-  $entity_types['entity_ce_display']->setFormClass('edit', EntityCustomElementsDisplayEditForm::class);
+  \Drupal::service(CustomElementsUiHooks::class)->entityTypeBuild($entity_types);
 }
 
 /**
  * Implements hook_entity_operation().
  */
-function custom_elements_ui_entity_operation(EntityInterface $entity) {
-  $operations = [];
-  $info = $entity->getEntityType();
-  // Add custom element display link if this entity type is the bundle of
-  // another and that type has field UI enabled.
-  if (($bundle_of = $info->getBundleOf()) && \Drupal::entityTypeManager()->getDefinition($bundle_of)->get('field_ui_base_route')) {
-    if (\Drupal::currentUser()->hasPermission('administer ' . $bundle_of . ' custom elements display')) {
-      $operations['manage-ce-display'] = [
-        'title' => t('Manage custom element'),
-        'weight' => 25,
-        'url' => Url::fromRoute("entity.entity_ce_display.{$bundle_of}.default", [
-          $entity->getEntityTypeId() => $entity->id(),
-        ]),
-      ];
-    }
-  }
-
-  return $operations;
+#[LegacyHook]
+function custom_elements_ui_entity_operation(EntityInterface $entity)
+{
+    return \Drupal::service(CustomElementsUiHooks::class)->entityOperation($entity);
 }
 
 /**
  * Implements hook_local_tasks_alter().
  */
-function custom_elements_ui_local_tasks_alter(&$local_tasks) {
-  $container = \Drupal::getContainer();
-  $local_task = CustomElementsUiLocalTask::create($container, 'custom_elements_ui.local_tasks');
-  $local_task->alterLocalTasks($local_tasks);
+#[LegacyHook]
+function custom_elements_ui_local_tasks_alter(&$local_tasks)
+{
+    \Drupal::service(CustomElementsUiHooks::class)->localTasksAlter($local_tasks);
 }
 
 /**
@@ -90,13 +63,7 @@ function custom_elements_ui_local_tasks_alter(&$local_tasks) {
  *
  * @see \Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask::getDerivativeDefinitions()
  */
+#[LegacyHook]
 function custom_elements_ui_menu_links_discovered_alter(&$links) {
-  if (\Drupal::moduleHandler()->moduleExists('admin_toolbar_tools')) {
-    // Sets the weight of "Manage permissions" links to keep correct order.
-    foreach ($links as $key => $link) {
-      if (str_starts_with($key, 'admin_toolbar_tools.extra_links:entity.entity_permissions_form.')) {
-        $links[$key]['weight'] = 4;
-      }
-    }
-  }
+  \Drupal::service(CustomElementsUiHooks::class)->menuLinksDiscoveredAlter($links);
 }
diff --git a/modules/custom_elements_ui/custom_elements_ui.services.yml b/modules/custom_elements_ui/custom_elements_ui.services.yml
index cb3c49f..88eadf9 100644
--- a/modules/custom_elements_ui/custom_elements_ui.services.yml
+++ b/modules/custom_elements_ui/custom_elements_ui.services.yml
@@ -9,3 +9,7 @@ services:
     arguments: [ '@entity_type.manager' ]
     tags:
       - { name: access_check, applies_to: _custom_elements_ui_view_mode_access }
+
+  Drupal\custom_elements_ui\Hook\CustomElementsUiHooks:
+    class: Drupal\custom_elements_ui\Hook\CustomElementsUiHooks
+    autowire: true
diff --git a/modules/custom_elements_ui/src/Hook/CustomElementsUiHooks.php b/modules/custom_elements_ui/src/Hook/CustomElementsUiHooks.php
new file mode 100644
index 0000000..8c1f09e
--- /dev/null
+++ b/modules/custom_elements_ui/src/Hook/CustomElementsUiHooks.php
@@ -0,0 +1,102 @@
+<?php
+
+namespace Drupal\custom_elements_ui\Hook;
+
+use Drupal\Core\Entity\Display\EntityDisplayInterface;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
+use Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm;
+use Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for custom_elements_ui.
+ */
+class CustomElementsUiHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_form_FORM_ID_alter() for \Drupal\field_ui\Form\EntityViewDisplayEditForm.
+     */
+    #[Hook('form_entity_view_display_edit_form_alter')]
+    public function formEntityViewDisplayEditFormAlter(&$form, \Drupal\Core\Form\FormStateInterface $form_state)
+    {
+        /** @var \Drupal\Core\Entity\Entity\EntityViewDisplay $display_entity */
+        $display_entity = $form_state->getFormObject()->getEntity();
+        $is_enabled = $display_entity->getThirdPartySetting('custom_elements', 'enabled', FALSE);
+        $form['custom_elements'] = [
+            '#type' => 'details',
+            '#open' => TRUE,
+            '#title' => $this->t('Custom Element'),
+            '#tree' => TRUE,
+        ];
+        $form['custom_elements']['enabled'] = [
+            '#type' => 'checkbox',
+            '#title' => $this->t('Force rendering as custom element'),
+            '#default_value' => $is_enabled,
+            '#description' => $this->t('Enable, to always render an entity as custom element. When disabled, the entity is only rendered as custom element whenever a module explicitly asks for it.'),
+        ];
+        $form['#entity_builders'][] = '_custom_elements_ui_entity_view_display_edit_form_builder';
+    }
+    /**
+     * Implements hook_entity_type_build().
+     */
+    #[Hook('entity_type_build')]
+    public static function entityTypeBuild(array &$entity_types)
+    {
+        /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
+        $entity_types['entity_ce_display']->setFormClass('edit', \Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm::class);
+    }
+    /**
+     * Implements hook_entity_operation().
+     */
+    #[Hook('entity_operation')]
+    public function entityOperation(\Drupal\Core\Entity\EntityInterface $entity)
+    {
+        $operations = [
+        ];
+        $info = $entity->getEntityType();
+        // Add custom element display link if this entity type is the bundle of
+        // another and that type has field UI enabled.
+        if (($bundle_of = $info->getBundleOf()) && \Drupal::entityTypeManager()->getDefinition($bundle_of)->get('field_ui_base_route')) {
+            if (\Drupal::currentUser()->hasPermission('administer ' . $bundle_of . ' custom elements display')) {
+                $operations['manage-ce-display'] = [
+                    'title' => $this->t('Manage custom element'),
+                    'weight' => 25,
+                    'url' => \Drupal\Core\Url::fromRoute("entity.entity_ce_display.{$bundle_of}.default", [
+                        $entity->getEntityTypeId() => $entity->id(),
+                    ]),
+                ];
+            }
+        }
+        return $operations;
+    }
+    /**
+     * Implements hook_local_tasks_alter().
+     */
+    #[Hook('local_tasks_alter')]
+    public static function localTasksAlter(&$local_tasks)
+    {
+        $container = \Drupal::getContainer();
+        $local_task = \Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask::create($container, 'custom_elements_ui.local_tasks');
+        $local_task->alterLocalTasks($local_tasks);
+    }
+    /**
+     * Implements hook_menu_links_discovered_alter().
+     *
+     * @see \Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask::getDerivativeDefinitions()
+     */
+    #[Hook('menu_links_discovered_alter')]
+    public static function menuLinksDiscoveredAlter(&$links)
+    {
+        if (\Drupal::moduleHandler()->moduleExists('admin_toolbar_tools')) {
+            // Sets the weight of "Manage permissions" links to keep correct order.
+            foreach ($links as $key => $link) {
+                if (str_starts_with($key, 'admin_toolbar_tools.extra_links:entity.entity_permissions_form.')) {
+                    $links[$key]['weight'] = 4;
+                }
+            }
+        }
+    }
+}
diff --git a/src/Hook/CanvasContentTemplateHooks.php b/src/Hook/CanvasContentTemplateHooks.php
index 5c27556..fed6a9d 100644
--- a/src/Hook/CanvasContentTemplateHooks.php
+++ b/src/Hook/CanvasContentTemplateHooks.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Drupal\custom_elements\Hook;
 
+use Drupal\Component\Utility\DeprecationHelper;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -46,7 +47,7 @@ final class CanvasContentTemplateHooks {
    */
   #[Hook('content_template_update')]
   public function update(ConfigEntityInterface $entity): void {
-    $was = $entity->original?->status() ?? FALSE;
+    $was = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => $entity->getOriginal(), fn() => $entity->original)?->status() ?? FALSE;
     $is = $entity->status();
     if ($is) {
       // Always ensure the prefix is applied while the template is active.
diff --git a/src/Hook/CustomElementsHooks.php b/src/Hook/CustomElementsHooks.php
new file mode 100644
index 0000000..8e654dd
--- /dev/null
+++ b/src/Hook/CustomElementsHooks.php
@@ -0,0 +1,111 @@
+<?php
+
+namespace Drupal\custom_elements\Hook;
+
+use Drupal\Component\Render\MarkupInterface;
+use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Render\BubbleableMetadata;
+use Drupal\Core\Render\Markup;
+use Drupal\Core\Template\Attribute;
+use Drupal\Core\Update\UpdateHookRegistry;
+use Drupal\custom_elements\CustomElement;
+use Drupal\custom_elements\CustomElementsEntityViewDisplay;
+use Drupal\custom_elements\CustomElementsLayoutBuilderEntityViewDisplay;
+use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for custom_elements.
+ */
+class CustomElementsHooks
+{
+    /**
+     * Implements hook_theme().
+     */
+    #[Hook('theme')]
+    public static function theme()
+    {
+        return [
+            'custom_element' => [
+                'variables' => [
+                    'custom_element' => NULL,
+                ],
+            ],
+            'custom_element__renderless_container' => [
+                'base hook' => 'custom_element',
+            ],
+        ];
+    }
+    /**
+     * Implements hook_theme_suggestions_HOOK().
+     */
+    #[Hook('theme_suggestions_custom_element')]
+    public static function themeSuggestionsCustomElement(array $variables)
+    {
+        $suggestions = [
+        ];
+        /** @var \Drupal\custom_elements\CustomElement $custom_element */
+        $custom_element = $variables['custom_element'];
+        // Add suggestion based on tag name.
+        $tag = str_replace('-', '_', $custom_element->getTag());
+        $suggestions[] = 'custom_element__' . $tag;
+        return $suggestions;
+    }
+    /**
+     * Implements hook_entity_type_alter().
+     *
+     * @see custom_elements_module_implements_alter()
+     */
+    #[Hook('entity_type_alter')]
+    public static function entityTypeAlter(array &$entity_types)
+    {
+        // Check if this call is made during layout_builder installation; changing
+        // the entity class would make the loadMultiple() call in
+        // layout_builder_install() fail fatally in that case. This check depends on
+        // ModuleInstaller implementation details, i.e. entity info is
+        // - (re)built before the module (version) is registered
+        // - not rebuilt between registering the module and invoking hook_install.
+        /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
+        $layout_builder_module_install_in_progress = $entity_types['entity_view_display']->getClass() === \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::class && \Drupal::service('update.update_hook_registry')->getInstalledVersion('layout_builder') == \Drupal\Core\Update\UpdateHookRegistry::SCHEMA_UNINSTALLED;
+        if (!$layout_builder_module_install_in_progress) {
+            // Use the right class depending on layout builder being used.
+            $class = \Drupal::moduleHandler()->moduleExists('layout_builder') ? \Drupal\custom_elements\CustomElementsLayoutBuilderEntityViewDisplay::class : \Drupal\custom_elements\CustomElementsEntityViewDisplay::class;
+            $entity_types['entity_view_display']->setClass($class);
+        }
+    }
+    /**
+     * Implements hook_modules_installed().
+     *
+     * @see custom_elements_entity_type_alter()
+     */
+    #[Hook('modules_installed')]
+    public static function modulesInstalled($modules, $is_syncing)
+    {
+        if (in_array('layout_builder', $modules, TRUE)) {
+            // Rebuild info that was not changed yet during installation.
+            \Drupal::entityTypeManager()->clearCachedDefinitions();
+        }
+    }
+    /**
+     * Implements hook_entity_view_display_alter().
+     */
+    #[Hook('entity_view_display_alter')]
+    public static function entityViewDisplayAlter(\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, array $context)
+    {
+        // Enable for all view-modes named appropriately by default.
+        if (strpos($context['view_mode'], 'custom_elements') === 0) {
+            $display->setThirdPartySetting('custom_elements', 'enabled', TRUE);
+        }
+    }
+    /**
+     * Implements hook_entity_view_alter().
+     */
+    #[Hook('entity_view_alter')]
+    public static function entityViewAlter(array &$build, \Drupal\Core\Entity\EntityInterface $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display)
+    {
+        // Alter the build array to apply custom elements rendering.
+        if (!empty($build['#custom_elements_enabled'])) {
+            $build['#theme'] = 'custom_element';
+        }
+    }
+}
diff --git a/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.module b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.module
index e70e213..37d4f6c 100644
--- a/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.module
+++ b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.module
@@ -4,7 +4,8 @@
  * @file
  * Contains hook implementations for testing Custom elements module.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\custom_elements_test_paragraphs\Hook\CustomElementsTestParagraphsHooks;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldItemListInterface;
@@ -15,21 +16,8 @@ use Drupal\Core\Session\AccountInterface;
  *
  * @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::setUp()
  */
-function custom_elements_test_paragraphs_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
-  // @see \Drupal\Tests\custom_elements\Functional\CustomElementsRenderMarkupTest::doTestImageParagraph()
-  // @see \Drupal\Tests\custom_elements\Functional\CustomElementsRenderMarkupTest::testNodeRendering()
-  if ($field_definition->getName() === 'field_teaser_text' || $field_definition->getName() === 'field_source') {
-    switch ($operation) {
-      case 'view':
-        // Never ever allow this field to be viewed: this lets
-        // EntityResourceTestBase::testGet() test in a "vanilla" way.
-        return AccessResult::forbidden();
-
-      case 'edit':
-        return AccessResult::forbidden();
-    }
-  }
-
-  // No opinion.
-  return AccessResult::neutral();
+#[LegacyHook]
+function custom_elements_test_paragraphs_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL)
+{
+    return \Drupal::service(CustomElementsTestParagraphsHooks::class)->entityFieldAccess($operation, $field_definition, $account, $items);
 }
diff --git a/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.services.yml b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.services.yml
new file mode 100644
index 0000000..0d816fc
--- /dev/null
+++ b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\custom_elements_test_paragraphs\Hook\CustomElementsTestParagraphsHooks:
+    class: Drupal\custom_elements_test_paragraphs\Hook\CustomElementsTestParagraphsHooks
+    autowire: true
diff --git a/tests/modules/custom_elements_test_paragraphs/src/Hook/CustomElementsTestParagraphsHooks.php b/tests/modules/custom_elements_test_paragraphs/src/Hook/CustomElementsTestParagraphsHooks.php
new file mode 100644
index 0000000..175252e
--- /dev/null
+++ b/tests/modules/custom_elements_test_paragraphs/src/Hook/CustomElementsTestParagraphsHooks.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\custom_elements_test_paragraphs\Hook;
+
+use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Field\FieldDefinitionInterface;
+use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for custom_elements_test_paragraphs.
+ */
+class CustomElementsTestParagraphsHooks
+{
+    /**
+     * Implements hook_entity_field_access().
+     *
+     * @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::setUp()
+     */
+    #[Hook('entity_field_access')]
+    public static function entityFieldAccess($operation, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, \Drupal\Core\Session\AccountInterface $account, ?\Drupal\Core\Field\FieldItemListInterface $items = NULL)
+    {
+        // @see \Drupal\Tests\custom_elements\Functional\CustomElementsRenderMarkupTest::doTestImageParagraph()
+        // @see \Drupal\Tests\custom_elements\Functional\CustomElementsRenderMarkupTest::testNodeRendering()
+        if ($field_definition->getName() === 'field_teaser_text' || $field_definition->getName() === 'field_source') {
+            switch ($operation) {
+                case 'view':
+                    // Never ever allow this field to be viewed: this lets
+                    // EntityResourceTestBase::testGet() test in a "vanilla" way.
+                    return \Drupal\Core\Access\AccessResult::forbidden();
+                case 'edit':
+                    return \Drupal\Core\Access\AccessResult::forbidden();
+            }
+        }
+        // No opinion.
+        return \Drupal\Core\Access\AccessResult::neutral();
+    }
+}
diff --git a/tests/src/Kernel/CanvasIntegrationTest.php b/tests/src/Kernel/CanvasIntegrationTest.php
index bcc25e6..c5af1ff 100644
--- a/tests/src/Kernel/CanvasIntegrationTest.php
+++ b/tests/src/Kernel/CanvasIntegrationTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\canvas\Entity\Page;
 use Drupal\canvas\Entity\VersionedConfigEntityBase;
 use Drupal\canvas_extjs\Plugin\Canvas\ComponentSource\ExternalJavaScriptComponent;
@@ -28,7 +29,7 @@ class CanvasIntegrationTest extends KernelTestBase {
   use TestDebugHelperTrait;
   use GenerateComponentConfigTrait;
   use NodeCreationTrait;
-  use \Drupal\custom_elements\CustomElementGeneratorTrait;
+  use CustomElementGeneratorTrait;
 
   /**
    * Global debug output killswitch.
diff --git a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
index 2794a57..5483e81 100644
--- a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
+++ b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
@@ -71,7 +71,6 @@ class ThunderParagraphRenderMarkupTest extends KernelTestBase {
     // install unneeded things, we may need to split the test module.
     $this->installSchema('node', 'node_access');
     $this->installSchema('file', 'file_usage');
-    $this->installSchema('system', ['sequences']);
     $this->installEntitySchema('file');
     $this->installEntitySchema('filter_format');
     $this->installEntitySchema('media_type');
