Closed
Description
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.