EventDataHelper throws an error when hook_event_dispatcher is installed alongside.

Created on 14 February 2025, 8 days ago

Problem/Motivation

Module is incompatible if the hook_event_dispatcher module is added which is a very common module

https://www.drupal.org/project/hook_event_dispatcher

Steps to reproduce

  1. Install the hook_event_dispatcher module
  2. An error can be seen:

    TypeError: Drupal\ws_event\EventDataHelper::__construct(): Argument #3 ($moduleHandler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /var/www/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\ws_event\EventDataHelper->__construct() (line 83 of modules/contrib/ws_event/src/EventDataHelper.php).

Proposed resolution

Update EventDataHelper service module handler to use ModuleHandlerInterface instead

Remaining tasks

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇨🇦Canada gordonio

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

Comments & Activities

Production build 0.71.5 2024