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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rodetrev created an issue. See original summary.

rodetrev’s picture

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

rodetrev’s picture

Version: 3.0.0 » 3.0.4
rodetrev’s picture

Issue summary: View changes
mglaman’s picture

Title: 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/do » Use ModuleHandlerInterface instead of ModuleHandler
Issue summary: View changes

It looks like it's caused by 3rd party module and this module expecting a concrete class, retitling.

n4r3n’s picture

Status: Active » Fixed

We merged the changes to dev branches. Thank you @rodetrev and @mglaman

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.