Skip to content

[Messenger] missing dependency symfony/event-dispatcher #34852

Closed
@Chrico

Description

@Chrico

Symfony version(s) affected: symfony/messenger: ^5

Description
Currently the symfony/messenger has no dependency in composer.json to symfony/event-dispatcher, but the Code internally relies on Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy and is not replaceable by e.G. just using the event-dispatcher-contracts as dependency.

See:

How to reproduce
Send a Message asynchronously without having symfony/event-dispatcher as dependency. 💥

Possible Solution

v1: Add symfony/event-dispatcher as require in composer.json

v2 (prefered): Use the injected Symfony\Contracts\EventDispatcher\EventDispatcherInterface correctly without relying on the LegacyEventDispatcherProxy-class to be there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions