Skip to content

Commit 38cad41

Browse files
author
Robin Chalas
committed
[EventDispatcher] Fix interface name used in error messages
1 parent 4559a65 commit 38cad41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public function dispatch($event/*, string $eventName = null*/)
5858
if (\is_object($event)) {
5959
$eventName = $eventName ?? \get_class($event);
6060
} else {
61-
@trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), E_USER_DEPRECATED);
61+
@trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', ContractsEventDispatcherInterface::class), E_USER_DEPRECATED);
6262
$swap = $event;
6363
$event = $eventName ?? new Event();
6464
$eventName = $swap;
6565

6666
if (!$event instanceof Event) {
67-
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event)));
67+
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', ContractsEventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event)));
6868
}
6969
}
7070

0 commit comments

Comments
 (0)