Crash when hook_event_dispatcher installed

Created on 18 March 2025, 18 days ago

Problem/Motivation

Type error when hook_event_dispatcher module is installed:

Uncaught PHP Exception TypeError: "Drupal\\viewer\\ViewerModule::__construct(): Argument #3 ($module_handler) must be of type Drupal\\viewer\\ModuleHandlerInterface, Drupal\\hook_event_dispatcher\\HookEventDispatcherModuleHandler given, called in /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259" at /var/www/drupal/web/modules/contrib/viewer/src/ViewerModule.php line 60

Steps to reproduce

Install viewer & hook_event_dispatcher

Proposed resolution

Switch use of "ModuleHandler" in ViewerModule.php to "ModuleHandlerInterface". Seems to work fine.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

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