Skip to content

Commit 781ca04

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Add extra information on AsEventListener attribute usage
2 parents c60d825 + a687a99 commit 781ca04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

event_dispatcher.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ having to add any configuration in external files::
162162
}
163163
}
164164

165-
You can add multiple ``#[AsEventListener]`` attributes to configure different methods::
165+
You can add multiple ``#[AsEventListener]`` attributes to configure different methods.
166+
The ``method`` property is optional, and when not defined, it defaults to
167+
``on`` + uppercased event name. In the example below, the ``'foo'`` event listener
168+
doesn't explicitly define its method, so the ``onFoo()`` method will be called::
166169

167170
namespace App\EventListener;
168171

0 commit comments

Comments
 (0)