Skip to content

Doctrine Event Subscribers are always registered before Event Listeners #28090

@mpdude

Description

@mpdude

The RegisterEventListenersAndSubscribersPass Compiler Pass will always handle Event Subscribers first and then look for Event Listeners (here).

The result is that subscribers will always run before listeners, regardless of the given priority. The priority will only affect the execution order of subscribers and listeners in their particular group (does that make it clear?).

This can cause surprising side effects when switching an implementation from a subscriber to a listener or vice versa.

IMO, there should be no such difference, and I also could not find any documentation or other hint that this difference was intended.

I can try to come up with a PR if those with enough karma to decide agree that this should be fixed.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy