Skip to content

Accept event dispatcher - #1599

Merged
greg0ire merged 1 commit into
doctrine:3.10.xfrom
greg0ire:relax-em-to-ed
Oct 9, 2026
Merged

greg0ire merged 1 commit into
doctrine:3.10.xfrom
greg0ire:relax-em-to-ed

Conversation

@greg0ire

@greg0ire greg0ire commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

This library uses only one method of the EventManager: dispatchEvent(). doctrine/event-manager 2.1.0 introduced an interface with just that method.

Version 3.7.0 of doctrine/orm has started using EventManagerInterface as a return type for EntityManager::getEventManager(), although it continues to return EventManager. It might stop doing so in 4.0.0, so let us adapt, since we do not actually need an EventManager instance.

I decided to drop support for doctrine/event-manager < 2.1 since doing
so allows avoiding union types, and since v2 is easy to adopt (it still supports PHP 8.1), and well
adopted already.

image

This library uses only one method of the EventManager: dispatchEvent().
doctrine/event-manager 2.1.0 introduced an interface with just that
method.

Version 3.7.0 of doctrine/orm has started using EventManagerInterface as
a return type for EntityManager::getEventManager(),
although it continues to return EventManager. It might stop doing so in
4.0.0, so let us adapt, since we do not actually need an EventManager
instance.

I decided to drop support for doctrine/event-manager < 2.1 since doing
so allows avoiding union types, and since v2 is easy to adopt, and well
adopted already.
@greg0ire greg0ire added this to the 3.10.0 milestone Oct 9, 2026
@greg0ire
greg0ire merged commit 7203823 into doctrine:3.10.x Oct 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants