diff --git a/custom_elements.module b/custom_elements.module
index 2552cd6..63e7a77 100644
--- a/custom_elements.module
+++ b/custom_elements.module
@@ -5,45 +5,30 @@
  * 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;
 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;
 
 /**
  * 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().
  */
+#[LegacyHook]
 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;
+  return \Drupal::service(CustomElementsHooks::class)->themeSuggestionsCustomElement($variables);
 }
 
 /**
@@ -186,25 +171,9 @@ function custom_elements_prepare_slots_as_vue_3(CustomElement $custom_element) {
  *
  * @see custom_elements_module_implements_alter()
  */
+#[LegacyHook]
 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);
-  }
+  \Drupal::service(CustomElementsHooks::class)->entityTypeAlter($entity_types);
 }
 
 /**
@@ -237,29 +206,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 a51ea3b..929ea96 100644
--- a/custom_elements.services.yml
+++ b/custom_elements.services.yml
@@ -99,3 +99,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_extra_formatters/tests/src/Kernel/TableFieldCeFormatterTest.php b/modules/custom_elements_extra_formatters/tests/src/Kernel/TableFieldCeFormatterTest.php
index 50937b6..d939c77 100644
--- a/modules/custom_elements_extra_formatters/tests/src/Kernel/TableFieldCeFormatterTest.php
+++ b/modules/custom_elements_extra_formatters/tests/src/Kernel/TableFieldCeFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements_extra_formatters\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\NodeInterface;
 use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
@@ -19,6 +21,8 @@ use Drupal\user\Entity\User;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class TableFieldCeFormatterTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/modules/custom_elements_ui/custom_elements_ui.module b/modules/custom_elements_ui/custom_elements_ui.module
index dbf2224..7eef7fa 100644
--- a/modules/custom_elements_ui/custom_elements_ui.module
+++ b/modules/custom_elements_ui/custom_elements_ui.module
@@ -5,34 +5,18 @@
  * 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;
-use Drupal\Core\Url;
-use Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm;
-use Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask;
 
 /**
  * Implements hook_form_FORM_ID_alter() for \Drupal\field_ui\Form\EntityViewDisplayEditForm.
  */
+#[LegacyHook]
 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';
+  \Drupal::service(CustomElementsUiHooks::class)->formEntityViewDisplayEditFormAlter($form, $form_state);
 }
 
 /**
@@ -48,41 +32,25 @@ 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().
  */
+#[LegacyHook]
 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;
+  return \Drupal::service(CustomElementsUiHooks::class)->entityOperation($entity);
 }
 
 /**
  * Implements hook_local_tasks_alter().
  */
+#[LegacyHook]
 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);
+  \Drupal::service(CustomElementsUiHooks::class)->localTasksAlter($local_tasks);
 }
 
 /**
@@ -90,13 +58,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..0cf7cfd
--- /dev/null
+++ b/modules/custom_elements_ui/src/Hook/CustomElementsUiHooks.php
@@ -0,0 +1,101 @@
+<?php
+
+namespace Drupal\custom_elements_ui\Hook;
+
+use Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask;
+use Drupal\Core\Url;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm;
+use Drupal\Core\Form\FormStateInterface;
+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, 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 function entityTypeBuild(array &$entity_types) {
+    /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
+    $entity_types['entity_ce_display']->setFormClass('edit', EntityCustomElementsDisplayEditForm::class);
+  }
+
+  /**
+   * Implements hook_entity_operation().
+   */
+  #[Hook('entity_operation')]
+  public function entityOperation(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' => 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 function localTasksAlter(&$local_tasks) {
+    $container = \Drupal::getContainer();
+    $local_task = 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 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/modules/custom_elements_ui/tests/src/Kernel/CanvasContentTemplateFormTest.php b/modules/custom_elements_ui/tests/src/Kernel/CanvasContentTemplateFormTest.php
index 8e0529b..2d2a33f 100644
--- a/modules/custom_elements_ui/tests/src/Kernel/CanvasContentTemplateFormTest.php
+++ b/modules/custom_elements_ui/tests/src/Kernel/CanvasContentTemplateFormTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements_ui\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\canvas\Entity\ContentTemplate;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
 use Drupal\KernelTests\KernelTestBase;
@@ -16,6 +18,8 @@ use Symfony\Component\HttpFoundation\Request;
  *
  * @group custom_elements_ui
  */
+#[Group('custom_elements_ui')]
+#[RunTestsInSeparateProcesses]
 class CanvasContentTemplateFormTest extends KernelTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/modules/custom_elements_ui/tests/src/Kernel/EntityCustomElementsDisplayEditFormTest.php b/modules/custom_elements_ui/tests/src/Kernel/EntityCustomElementsDisplayEditFormTest.php
index 76270c7..ac8e11c 100644
--- a/modules/custom_elements_ui/tests/src/Kernel/EntityCustomElementsDisplayEditFormTest.php
+++ b/modules/custom_elements_ui/tests/src/Kernel/EntityCustomElementsDisplayEditFormTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements_ui\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -17,6 +19,8 @@ use Drupal\user\Entity\User;
  *
  * @group custom_elements_ui
  */
+#[Group('custom_elements_ui')]
+#[RunTestsInSeparateProcesses]
 class EntityCustomElementsDisplayEditFormTest extends KernelTestBase {
 
   /**
@@ -126,7 +130,6 @@ class EntityCustomElementsDisplayEditFormTest extends KernelTestBase {
     $reflection = new \ReflectionClass($this->form);
     if ($reflection->hasProperty('entityTypeManager')) {
       $entityTypeManagerProperty = $reflection->getProperty('entityTypeManager');
-      $entityTypeManagerProperty->setAccessible(TRUE);
       if ($entityTypeManagerProperty->getValue($this->form) === NULL) {
         $entityTypeManagerProperty->setValue($this->form, $this->container->get('entity_type.manager'));
       }
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..24f0a74
--- /dev/null
+++ b/src/Hook/CustomElementsHooks.php
@@ -0,0 +1,106 @@
+<?php
+
+namespace Drupal\custom_elements\Hook;
+
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
+use Drupal\custom_elements\CustomElementsEntityViewDisplay;
+use Drupal\custom_elements\CustomElementsLayoutBuilderEntityViewDisplay;
+use Drupal\Core\Update\UpdateHookRegistry;
+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 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 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 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() === 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);
+    }
+  }
+
+  /**
+   * Implements hook_modules_installed().
+   *
+   * @see custom_elements_entity_type_alter()
+   */
+  #[Hook('modules_installed')]
+  public 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 function entityViewDisplayAlter(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 function entityViewAlter(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';
+    }
+  }
+
+}
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..5e7836d 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
@@ -5,7 +5,8 @@
  * Contains hook implementations for testing Custom elements module.
  */
 
-use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\custom_elements_test_paragraphs\Hook\CustomElementsTestParagraphsHooks;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -15,21 +16,7 @@ use Drupal\Core\Session\AccountInterface;
  *
  * @see \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::setUp()
  */
+#[LegacyHook]
 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();
+  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..7a52181
--- /dev/null
+++ b/tests/modules/custom_elements_test_paragraphs/src/Hook/CustomElementsTestParagraphsHooks.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\custom_elements_test_paragraphs\Hook;
+
+use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Field\FieldDefinitionInterface;
+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 function entityFieldAccess($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();
+  }
+
+}
diff --git a/tests/src/Functional/CustomElementsRenderMarkupTest.php b/tests/src/Functional/CustomElementsRenderMarkupTest.php
index 8222220..0c0f6f5 100644
--- a/tests/src/Functional/CustomElementsRenderMarkupTest.php
+++ b/tests/src/Functional/CustomElementsRenderMarkupTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Config\FileStorage;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
@@ -19,6 +21,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  * @todo convert these into kernel tests. The only(?) reason this isn't yet,
  *   is the filesystem copy has not been dealt with.
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementsRenderMarkupTest extends BrowserTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Functional/CustomElementsRenderMarkupVue3Test.php b/tests/src/Functional/CustomElementsRenderMarkupVue3Test.php
index 424b192..53af4ad 100644
--- a/tests/src/Functional/CustomElementsRenderMarkupVue3Test.php
+++ b/tests/src/Functional/CustomElementsRenderMarkupVue3Test.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\paragraphs\Entity\Paragraph;
 
@@ -10,6 +12,8 @@ use Drupal\paragraphs\Entity\Paragraph;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementsRenderMarkupVue3Test extends CustomElementsRenderMarkupTest {
 
   /**
diff --git a/tests/src/Functional/LayoutBuilderModuleInstallationTest.php b/tests/src/Functional/LayoutBuilderModuleInstallationTest.php
index 80e5a0c..7280d15 100644
--- a/tests/src/Functional/LayoutBuilderModuleInstallationTest.php
+++ b/tests/src/Functional/LayoutBuilderModuleInstallationTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Entity\Entity\EntityViewDisplay;
 use Drupal\Tests\BrowserTestBase;
 
@@ -14,6 +16,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class LayoutBuilderModuleInstallationTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Kernel/BundleTypeCeFieldFormatterTest.php b/tests/src/Kernel/BundleTypeCeFieldFormatterTest.php
index cd85ccc..38d8cd3 100644
--- a/tests/src/Kernel/BundleTypeCeFieldFormatterTest.php
+++ b/tests/src/Kernel/BundleTypeCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
@@ -19,6 +21,8 @@ use Drupal\user\Entity\User;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class BundleTypeCeFieldFormatterTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Kernel/CanvasContentTemplateHooksTest.php b/tests/src/Kernel/CanvasContentTemplateHooksTest.php
index 520a0a5..7b7edc0 100644
--- a/tests/src/Kernel/CanvasContentTemplateHooksTest.php
+++ b/tests/src/Kernel/CanvasContentTemplateHooksTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\canvas\Entity\ContentTemplate;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
 use Drupal\KernelTests\KernelTestBase;
@@ -15,6 +17,8 @@ use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CanvasContentTemplateHooksTest extends KernelTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Kernel/CanvasContentTemplateRenderTest.php b/tests/src/Kernel/CanvasContentTemplateRenderTest.php
index 00cc2ab..0529d7b 100644
--- a/tests/src/Kernel/CanvasContentTemplateRenderTest.php
+++ b/tests/src/Kernel/CanvasContentTemplateRenderTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\canvas\Entity\ContentTemplate;
 use Drupal\canvas\Entity\VersionedConfigEntityBase;
 use Drupal\canvas_extjs\Plugin\Canvas\ComponentSource\ExternalJavaScriptComponent;
@@ -27,6 +29,8 @@ use Drupal\Tests\user\Traits\UserCreationTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CanvasContentTemplateRenderTest extends KernelTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Kernel/CanvasIntegrationTest.php b/tests/src/Kernel/CanvasIntegrationTest.php
index bcc25e6..51d1519 100644
--- a/tests/src/Kernel/CanvasIntegrationTest.php
+++ b/tests/src/Kernel/CanvasIntegrationTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
+use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\canvas\Entity\Page;
 use Drupal\canvas\Entity\VersionedConfigEntityBase;
 use Drupal\canvas_extjs\Plugin\Canvas\ComponentSource\ExternalJavaScriptComponent;
@@ -22,13 +24,14 @@ use Drupal\Tests\node\Traits\NodeCreationTrait;
 /**
  * Tests integration between Custom Elements and Canvas.
  */
+#[RunTestsInSeparateProcesses]
 class CanvasIntegrationTest extends KernelTestBase {
 
   use ContentTypeCreationTrait;
   use TestDebugHelperTrait;
   use GenerateComponentConfigTrait;
   use NodeCreationTrait;
-  use \Drupal\custom_elements\CustomElementGeneratorTrait;
+  use CustomElementGeneratorTrait;
 
   /**
    * Global debug output killswitch.
diff --git a/tests/src/Kernel/CustomElementBaseRenderTest.php b/tests/src/Kernel/CustomElementBaseRenderTest.php
index 65dde3b..c183482 100644
--- a/tests/src/Kernel/CustomElementBaseRenderTest.php
+++ b/tests/src/Kernel/CustomElementBaseRenderTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Render\BubbleableMetadata;
 use Drupal\Core\Render\RendererInterface;
 use Drupal\KernelTests\KernelTestBase;
@@ -26,6 +28,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementBaseRenderTest extends KernelTestBase {
 
   use TestHelperTrait;
diff --git a/tests/src/Kernel/CustomElementCacheMetadataTest.php b/tests/src/Kernel/CustomElementCacheMetadataTest.php
index 47937b9..3a0dcf1 100644
--- a/tests/src/Kernel/CustomElementCacheMetadataTest.php
+++ b/tests/src/Kernel/CustomElementCacheMetadataTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Cache\Cache;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
@@ -11,6 +13,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementCacheMetadataTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/CustomElementGeneratorTest.php b/tests/src/Kernel/CustomElementGeneratorTest.php
index 69e8e53..8ba0d36 100644
--- a/tests/src/Kernel/CustomElementGeneratorTest.php
+++ b/tests/src/Kernel/CustomElementGeneratorTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\Entity\EntityViewMode;
 use Drupal\KernelTests\KernelTestBase;
@@ -19,6 +21,8 @@ use Drupal\Component\Utility\DeprecationHelper;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementGeneratorTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Kernel/CustomElementKernelTest.php b/tests/src/Kernel/CustomElementKernelTest.php
index 16ea971..5d11a52 100644
--- a/tests/src/Kernel/CustomElementKernelTest.php
+++ b/tests/src/Kernel/CustomElementKernelTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -11,6 +13,8 @@ use Drupal\KernelTests\KernelTestBase;
  * @group custom_elements
  * @see \Drupal\Tests\custom_elements\Unit\CustomElementUnitTest
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementKernelTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/CustomElementNormalizerExplicitFormatTest.php b/tests/src/Kernel/CustomElementNormalizerExplicitFormatTest.php
index 0f0b710..bb280a1 100644
--- a/tests/src/Kernel/CustomElementNormalizerExplicitFormatTest.php
+++ b/tests/src/Kernel/CustomElementNormalizerExplicitFormatTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -10,6 +12,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementNormalizerExplicitFormatTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/CustomElementNormalizerLegacyFormatTest.php b/tests/src/Kernel/CustomElementNormalizerLegacyFormatTest.php
index 62386b7..368f422 100644
--- a/tests/src/Kernel/CustomElementNormalizerLegacyFormatTest.php
+++ b/tests/src/Kernel/CustomElementNormalizerLegacyFormatTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -10,6 +12,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementNormalizerLegacyFormatTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/CustomElementsPreviewTest.php b/tests/src/Kernel/CustomElementsPreviewTest.php
index 51cb401..fa9a91d 100644
--- a/tests/src/Kernel/CustomElementsPreviewTest.php
+++ b/tests/src/Kernel/CustomElementsPreviewTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\custom_elements\PreviewProvider\CustomElementsPreviewProviderInterface;
 use Drupal\KernelTests\KernelTestBase;
@@ -12,6 +14,8 @@ use Symfony\Component\HttpFoundation\Request;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class CustomElementsPreviewTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/EntityCeDisplayTest.php b/tests/src/Kernel/EntityCeDisplayTest.php
index 2711c49..60ebbf5 100644
--- a/tests/src/Kernel/EntityCeDisplayTest.php
+++ b/tests/src/Kernel/EntityCeDisplayTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
@@ -15,6 +17,8 @@ use Drupal\field\Entity\FieldStorageConfig;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class EntityCeDisplayTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Kernel/EntityReferenceCeFieldFormatterTest.php b/tests/src/Kernel/EntityReferenceCeFieldFormatterTest.php
index a6bbafa..2c82d67 100644
--- a/tests/src/Kernel/EntityReferenceCeFieldFormatterTest.php
+++ b/tests/src/Kernel/EntityReferenceCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\Tests\user\Traits\UserCreationTrait;
@@ -19,6 +21,8 @@ use Drupal\paragraphs\Entity\Paragraph;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class EntityReferenceCeFieldFormatterTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Kernel/FallbackRenderConverterTest.php b/tests/src/Kernel/FallbackRenderConverterTest.php
index 4eecef5..024f46a 100644
--- a/tests/src/Kernel/FallbackRenderConverterTest.php
+++ b/tests/src/Kernel/FallbackRenderConverterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -12,6 +14,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @see \Drupal\custom_elements\RenderConverter\FallbackRenderConverter
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class FallbackRenderConverterTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/Formatter/AutoCeFieldFormatterTest.php b/tests/src/Kernel/Formatter/AutoCeFieldFormatterTest.php
index 260c5ba..addfb9f 100644
--- a/tests/src/Kernel/Formatter/AutoCeFieldFormatterTest.php
+++ b/tests/src/Kernel/Formatter/AutoCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\Formatter;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
@@ -14,6 +16,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class AutoCeFieldFormatterTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/Formatter/ImageCeFieldFormatterTest.php b/tests/src/Kernel/Formatter/ImageCeFieldFormatterTest.php
index 698212c..deadc90 100644
--- a/tests/src/Kernel/Formatter/ImageCeFieldFormatterTest.php
+++ b/tests/src/Kernel/Formatter/ImageCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\Formatter;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Core\Render\Markup;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
@@ -17,6 +19,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class ImageCeFieldFormatterTest extends KernelTestBase {
 
   use ContentTranslationTestTrait;
diff --git a/tests/src/Kernel/Formatter/PathCeFieldFormatterTest.php b/tests/src/Kernel/Formatter/PathCeFieldFormatterTest.php
index 3f98646..984cf8c 100644
--- a/tests/src/Kernel/Formatter/PathCeFieldFormatterTest.php
+++ b/tests/src/Kernel/Formatter/PathCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\Formatter;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
@@ -15,6 +17,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class PathCeFieldFormatterTest extends KernelTestBase {
 
   use ContentTranslationTestTrait;
diff --git a/tests/src/Kernel/Formatter/PlainTextCeFieldFormatterTest.php b/tests/src/Kernel/Formatter/PlainTextCeFieldFormatterTest.php
index 5a312a6..19f7b43 100644
--- a/tests/src/Kernel/Formatter/PlainTextCeFieldFormatterTest.php
+++ b/tests/src/Kernel/Formatter/PlainTextCeFieldFormatterTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\Formatter;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\custom_elements\Entity\EntityCeDisplay;
 use Drupal\field\Entity\FieldConfig;
@@ -16,6 +18,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class PlainTextCeFieldFormatterTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
diff --git a/tests/src/Kernel/LayoutBuilderIntegrationTest.php b/tests/src/Kernel/LayoutBuilderIntegrationTest.php
index ce175cb..b3c0d3e 100644
--- a/tests/src/Kernel/LayoutBuilderIntegrationTest.php
+++ b/tests/src/Kernel/LayoutBuilderIntegrationTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\Core\Entity\Entity\EntityViewDisplay;
 use Drupal\KernelTests\KernelTestBase;
@@ -18,6 +20,8 @@ use Drupal\Tests\node\Traits\NodeCreationTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class LayoutBuilderIntegrationTest extends KernelTestBase {
 
   use ContentTypeCreationTrait;
diff --git a/tests/src/Kernel/PreviewProvider/JsonPreviewProviderTest.php b/tests/src/Kernel/PreviewProvider/JsonPreviewProviderTest.php
index 813f8dd..08321ca 100644
--- a/tests/src/Kernel/PreviewProvider/JsonPreviewProviderTest.php
+++ b/tests/src/Kernel/PreviewProvider/JsonPreviewProviderTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\PreviewProvider;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\custom_elements\PreviewProvider\CustomElementsPreviewProviderInterface;
 use Drupal\KernelTests\KernelTestBase;
@@ -11,6 +13,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class JsonPreviewProviderTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/PreviewProvider/MarkupPreviewProviderTest.php b/tests/src/Kernel/PreviewProvider/MarkupPreviewProviderTest.php
index 6b28233..caca1dd 100644
--- a/tests/src/Kernel/PreviewProvider/MarkupPreviewProviderTest.php
+++ b/tests/src/Kernel/PreviewProvider/MarkupPreviewProviderTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\PreviewProvider;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\custom_elements\PreviewProvider\CustomElementsPreviewProviderInterface;
 use Drupal\KernelTests\KernelTestBase;
@@ -11,6 +13,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class MarkupPreviewProviderTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/PreviewProvider/NuxtPreviewProviderTest.php b/tests/src/Kernel/PreviewProvider/NuxtPreviewProviderTest.php
index 9eb3fcb..93f0908 100644
--- a/tests/src/Kernel/PreviewProvider/NuxtPreviewProviderTest.php
+++ b/tests/src/Kernel/PreviewProvider/NuxtPreviewProviderTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel\PreviewProvider;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 
@@ -10,6 +12,8 @@ use Drupal\KernelTests\KernelTestBase;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class NuxtPreviewProviderTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/RenderVariantTest.php b/tests/src/Kernel/RenderVariantTest.php
index aaad8af..5827bf1 100644
--- a/tests/src/Kernel/RenderVariantTest.php
+++ b/tests/src/Kernel/RenderVariantTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Symfony\Component\HttpFoundation\Request;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElement;
@@ -11,6 +13,8 @@ use Drupal\custom_elements\CustomElement;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class RenderVariantTest extends KernelTestBase {
 
   /**
diff --git a/tests/src/Kernel/RenderlessContainerTest.php b/tests/src/Kernel/RenderlessContainerTest.php
index 5aab342..3a3f04e 100644
--- a/tests/src/Kernel/RenderlessContainerTest.php
+++ b/tests/src/Kernel/RenderlessContainerTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\custom_elements\CustomElement;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
@@ -11,6 +13,8 @@ use Drupal\Tests\custom_elements\Traits\TestHelperTrait;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class RenderlessContainerTest extends KernelTestBase {
 
   use TestHelperTrait;
diff --git a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
index 2794a57..160e3c9 100644
--- a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
+++ b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\file\Entity\File;
@@ -18,6 +20,8 @@ use Symfony\Component\Yaml\Parser;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class ThunderParagraphRenderMarkupTest extends KernelTestBase {
 
   use CustomElementGeneratorTrait;
@@ -71,7 +75,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');
diff --git a/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php b/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
index f9acce5..9d6f3ef 100644
--- a/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
+++ b/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
@@ -2,6 +2,9 @@
 
 namespace Drupal\Tests\custom_elements\Kernel;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
+
 /**
  * Test rendering custom elements using paragraph bundles' in Vue3 style.
  *
@@ -13,6 +16,8 @@ namespace Drupal\Tests\custom_elements\Kernel;
  *
  * @group custom_elements
  */
+#[Group('custom_elements')]
+#[RunTestsInSeparateProcesses]
 class ThunderParagraphRenderMarkupVue3Test extends ThunderParagraphRenderMarkupTest {
 
   /**
diff --git a/tests/src/Unit/CustomElementUnitTest.php b/tests/src/Unit/CustomElementUnitTest.php
index 4c788de..ef7aea6 100644
--- a/tests/src/Unit/CustomElementUnitTest.php
+++ b/tests/src/Unit/CustomElementUnitTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\custom_elements\Unit;
 
+use PHPUnit\Framework\Attributes\Group;
 use Drupal\custom_elements\CustomElement;
 use PHPUnit\Framework\TestCase;
 
@@ -11,6 +12,7 @@ use PHPUnit\Framework\TestCase;
  * @group custom_elements
  * @see \Drupal\Tests\custom_elements\Kernel\CustomElementKernelTest
  */
+#[Group('custom_elements')]
 class CustomElementUnitTest extends TestCase {
 
   /**
