Skip to content

Commit facaf80

Browse files
committed
minor #21015 [EventDispatcher] Document event name is optional (alamirault)
This PR was merged into the 6.4 branch. Discussion ---------- [EventDispatcher] Document event name is optional Close #21000 Commits ------- b356a5b [EventDispatcher] Document event name is optionnal
2 parents bbe120e + b356a5b commit facaf80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/event_dispatcher.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ Dispatch the Event
277277

278278
The :method:`Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch`
279279
method notifies all listeners of the given event. It takes two arguments:
280-
the ``Event`` instance to pass to each listener of that event and the name
281-
of the event to dispatch::
280+
the ``Event`` instance to pass to each listener of that event and optionally the
281+
name of the event to dispatch. If it's not defined, the class of the ``Event``
282+
instance will be used::
282283

283284
use Acme\Store\Event\OrderPlacedEvent;
284285
use Acme\Store\Order;

0 commit comments

Comments
 (0)