From 036eec8f3087091a57b6ed1eca92d3520daa0a95 Mon Sep 17 00:00:00 2001 From: Vincent Chareunphol Date: Thu, 16 May 2024 12:48:39 +0200 Subject: [PATCH] Add extra information on AsEventListener attribute usage --- event_dispatcher.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/event_dispatcher.rst b/event_dispatcher.rst index 897157b4724..dc1682f39e6 100644 --- a/event_dispatcher.rst +++ b/event_dispatcher.rst @@ -162,7 +162,9 @@ having to add any configuration in external files:: } } -You can add multiple ``#[AsEventListener]`` attributes to configure different methods:: +You can add multiple ``#[AsEventListener]`` attributes to configure different methods. +In the below example, for ``foo`` event, ``onFoo`` method will be called +implicitly if method attribute is not set:: namespace App\EventListener;