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
@@ -63,13 +63,8 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null): void
63
63
}
64
64
}
65
65
66
-
publicfunctiongetListeners($event = null): array
66
+
publicfunctiongetListeners(string$event): array
67
67
{
68
-
if (null === $event) {
69
-
trigger_deprecation('symfony/doctrine-bridge', '6.2', 'Calling "%s()" without an event name is deprecated. Call "getAllListeners()" instead.', __METHOD__);
70
-
71
-
return$this->getAllListeners();
72
-
}
73
68
if (!$this->initializedSubscribers) {
74
69
$this->initializeSubscribers();
75
70
}
@@ -95,7 +90,7 @@ public function getAllListeners(): array
95
90
return$this->listeners;
96
91
}
97
92
98
-
publicfunctionhasListeners($event): bool
93
+
publicfunctionhasListeners(string$event): bool
99
94
{
100
95
if (!$this->initializedSubscribers) {
101
96
$this->initializeSubscribers();
@@ -104,7 +99,7 @@ public function hasListeners($event): bool
@@ -185,12 +180,8 @@ private function initializeSubscribers(): void
185
180
$this->addEventListener(...$listener);
186
181
continue;
187
182
}
188
-
if (\is_string($listener)) {
189
-
$listener = $this->container->get($listener);
190
-
}
191
-
// throw new \InvalidArgumentException(sprintf('Using Doctrine subscriber "%s" is not allowed, declare it as a listener instead.', \is_object($listener) ? $listener::class : $listener));
192
-
trigger_deprecation('symfony/doctrine-bridge', '6.3', 'Using Doctrine subscribers as services is deprecated, declare listeners instead');
193
-
parent::addEventSubscriber($listener);
183
+
184
+
thrownew \InvalidArgumentException(sprintf('Using Doctrine subscriber "%s" is not allowed, declare it as a listener instead.', get_debug_type($listener)));
trigger_deprecation('symfony/doctrine-bridge', '6.4', 'Not passing an instance of "%s" as "$debugDataHolder" to "%s()" is deprecated.', DebugDataHolder::class, __METHOD__);
49
-
}
50
-
}
51
-
52
-
/**
53
-
* Adds the stack logger for a connection.
54
-
*
55
-
* @return void
56
-
*
57
-
* @deprecated since Symfony 6.4, use a DebugDataHolder instead.
trigger_deprecation('symfony/doctrine-bridge', '6.4', '"%s()" is deprecated. Pass an instance of "%s" to the constructor instead.', __METHOD__, DebugDataHolder::class);
0 commit comments