Skip to content

Commit a687a99

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Add extra information on AsEventListener attribute usage
2 parents 7372a0b + 81ca5c2 commit a687a99

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)