Problem/Motivation

When installing Drupal core with ECA enabled, the installation fails with a 500 error.

The stack trace shows:

Symfony\Component\DependencyInjection\Exception\RuntimeException: 
You have requested a synthetic service ("kernel"). 
The DIC does not know how to construct this service.

This happens because ECA’s plugin base / helper messenger tries to access the kernel synthetic service during the install batch process. At that point, the service container is not yet fully initialized.

This prevents Drupal installation from completing successfully.

Steps to reproduce

  • Start a fresh Drupal installation.
  • Enable eca and eca_helper during install. ( in a custom profile/distro
  • Run installation via install.php.
  • During module install batch, installation crashes with the above error.

Proposed resolution

  • Add a try/catch safeguard around the event dispatch in Messenger::addMessage().
  • If services are not yet available (installation/bootstrap phase), gracefully fall back to the original messenger service.
  • Otherwise, continue dispatching ECA events as expected.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork eca_helper-3549723

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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Status: Active » Needs review

  • rajab natshah committed 994669b7 on 3.0.x
    [#3549723] fix: Prevent DIC RuntimeException when kernel service...
erutan’s picture

Status: Needs review » Fixed

This has been committed to the main branch, so NR doesn't seem accurate.

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.

zipme_hkt’s picture

Status: Fixed » Closed (fixed)