Skip to content

Commit a5f0e76

Browse files
committed
[EventDispatcher] Try first if the event is Stopped
1 parent 7a8de67 commit a5f0e76

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public function dispatch($eventName, Event $event = null)
136136
$event = new Event();
137137
}
138138

139+
if (null !== $this->logger && $event->isPropagationStopped()) {
140+
$this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
141+
}
142+
139143
$eventId = ++$this->lastEventId;
140144

141145
$this->preDispatch($eventName, $eventId, $event);

0 commit comments

Comments
 (0)