File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,12 @@ can also be applied to methods directly::
210
210
// ...
211
211
}
212
212
213
+ #[AsEventListener]
214
+ public function onMultipleCustomEvent(CustomEvent|AnotherCustomEvent $event): void
215
+ {
216
+ // ...
217
+ }
218
+
213
219
#[AsEventListener(event: 'foo', priority: 42)]
214
220
public function onFoo(): void
215
221
{
@@ -228,6 +234,10 @@ can also be applied to methods directly::
228
234
Note that the attribute doesn't require its ``event `` parameter to be set
229
235
if the method already type-hints the expected event.
230
236
237
+ .. versionadded :: 7.4
238
+
239
+ The support for union types in the method type-hints was introduced in Symfony 7.4.
240
+
231
241
.. _events-subscriber :
232
242
233
243
Creating an Event Subscriber
You can’t perform that action at this time.
0 commit comments