You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #39978 [DoctrineBridge] Make subscriber and listeners prioritizable (jderusse)
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DoctrineBridge] Make subscriber and listeners prioritizable
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#28090
| License | MIT
| Doc PR | -
handle Doctrine's eventSubscriber and eventListener priority (listener exposed by the eventSubscriber will have the same priority than the eventListener)
Commits
-------
14a613b Make subscriber and listeners prioritizable
if ($listenerTag === $tagName && !isset($tag['event'])) {
82
+
thrownewInvalidArgumentException(sprintf('Doctrine event listener "%s" must specify the "event" attribute.', $id));
83
+
}
81
84
foreach ($connectionsas$con) {
82
85
if (!isset($this->connections[$con])) {
83
86
thrownewRuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: "%s".', $con, $id, implode('", "', array_keys($this->connections))));
@@ -95,39 +98,25 @@ private function addTaggedSubscribers(ContainerBuilder $container, array &$liste
95
98
}
96
99
97
100
if (ContainerAwareEventManager::class === $managerClass) {
thrownewRuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: "%s".', $con, $id, implode('", "', array_keys($this->connections))));
124
-
}
125
-
$listenerRefs[$con][$id] = newReference($id);
126
-
127
-
// we add one call per event per service so we have the correct order
0 commit comments