From d3d950c539e199ba3e3fcd6d6c87359d0096c4f0 Mon Sep 17 00:00:00 2001 From: gaincoder Date: Sat, 29 Jun 2019 22:07:30 +0200 Subject: [PATCH] deprecated dispatch parameter order On this page the new contract-event class is used, but that will not work together with the deprecated parameter order of dispatch() --- components/event_dispatcher.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index 98392126348..fbb07306069 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -303,7 +303,7 @@ each listener of that event:: // creates the OrderPlacedEvent and dispatches it $event = new OrderPlacedEvent($order); - $dispatcher->dispatch(OrderPlacedEvent::NAME, $event); + $dispatcher->dispatch($event, OrderPlacedEvent::NAME); Notice that the special ``OrderPlacedEvent`` object is created and passed to the ``dispatch()`` method. Now, any listener to the ``order.placed``