Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 38cad41

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

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.