Problem/Motivation

When another module decorates the Messenger service, eca's drush commands will not be available. Constructor argument mismatch exception is observed in debug log.

Could not instantiate Drupal\eca\Drush\Commands\EcaCommands: Drupal\eca\Service\ExportRecipe::__construct(): Argument #5 ($messenger) must be of type Drupal\Core\Messenger\Messenger, Drupal\eca_helper\Decorate\Messenger given, called in /Users/starlight/Sites/obelix2026merge/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261

Steps to reproduce

  1. Install both ECA and the contrib module ECA Helper
  2. Run command drush -vvv eca
  3. Observe the exception.
  4. Observe that eca namespace commands are missing from the returned command list

Proposed resolution

\Drupal\eca\Service\ExportRecipe::__construct() should typehint MessengerInterface instead of Messenger.

Remaining tasks

User interface changes

No changes

API changes

No changes

Data model changes

No changes

Issue fork eca-3579628

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

starlight-sparkle created an issue. See original summary.

starlight-sparkle’s picture

Status: Active » Needs review
starlight-sparkle’s picture

Issue summary: View changes

Fixed typos in issue summary.

jurgenhaas’s picture

Status: Needs review » Fixed

Great finding and thanks for contributing the fix, @starlight-sparkle

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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