Use ModuleHandlerInterface instead of ModuleHandler

Created on 2 March 2023, over 1 year ago
Updated 10 March 2023, over 1 year ago

Problem/Motivation

When running drush in Drupal 9.5.3, the whole service crashes with the following error:

[error]  TypeError: Drupal\acquia_contenthub\PubSubModuleStatusChecker::__construct(): Argument #1 ($module_handler_service) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /app/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\acquia_contenthub\PubSubModuleStatusChecker->__construct() (line 31 of /app/docroot/modules/contrib/acquia_contenthub/src/PubSubModuleStatusChecker.php) #0 /app/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\acquia_contenthub\PubSubModuleStatusChecker->__construct(Object(Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler))

Steps to reproduce

Proposed resolution

To fix this Drupal\Core\Extension\ModuleHandlerInterface should be injected in PubSubModuleStatusChecker construct.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024