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
Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
+38-2Lines changed: 38 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
14
14
useDoctrine\Common\EventArgs;
15
15
useDoctrine\Common\EventManager;
16
+
useDoctrine\Common\EventSubscriber;
16
17
usePsr\Container\ContainerInterface;
17
18
18
19
/**
@@ -34,6 +35,9 @@ class ContainerAwareEventManager extends EventManager
34
35
private$methods = [];
35
36
private$container;
36
37
38
+
/**
39
+
* @param list<string|EventSubscriber|array{string[], string|object}> $subscriberIds list of subscriber, subscriberIds or couple of events+eventListener
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))));
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