Git rid of 'Hook Event Dispatcher' module depenecy

Created on 19 May 2025, 24 days ago

Problem/Motivation

Drupal 11.1 introduces Support for object oriented hook implementations using autowired services https://www.drupal.org/node/3442349

Opting to use Drupal core's native capabilities for implementing hooks in an object-oriented manner, instead of relying on the hook_event_dispatcher module, primarily aims to reduce project dependencies and simplify the overall codebase. Leveraging core functionalities generally leads to better long-term stability, improved compatibility with future Drupal versions, and a more streamlined development experience by removing an intermediary layer.

Proposed resolution

  • Move the needed logic from event subscribers to a new service with the
  • Move the needed logic from event subscribers to a new service using [#Hook] attribute
  • Add legacy hooks to layout_builder_ids.module file with #[LegacyHook] attribute for backwards-compatibility for Drupal versions from 10.1 to 11.0
  • Remove event subscribers related to hooks classes and definition
📌 Task
Status

Active

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024