Exception when resolving eca drush commands if Messenger service is decorated
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3579628. --> Reported by: [starlight-sparkle](https://www.drupal.org/user/3804225) Related to !602 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When another module decorates the Messenger service, eca's drush commands will not be available. Constructor argument mismatch exception is observed in debug log.</p> <pre>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</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Install both ECA and the contrib module ECA Helper</li> <li>Run command <code>drush -vvv eca</code></li> <li>Observe the exception.</li> <li>Observe that eca namespace commands are missing from the returned command list</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p><code>\Drupal\eca\Service\ExportRecipe::__construct()</code> should typehint <code>MessengerInterface</code> instead of <code>Messenger</code>.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <p>No changes</p> <h3 id="summary-api-changes">API changes</h3> <p>No changes</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>No changes</p>
issue