summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/EventDispatcher/EventDispatcher.php3
-rw-r--r--lib/private/EventDispatcher/SymfonyAdapter.php3
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/EventDispatcher/EventDispatcher.php b/lib/private/EventDispatcher/EventDispatcher.php
index 8fe4bcbb942..4e1fba67663 100644
--- a/lib/private/EventDispatcher/EventDispatcher.php
+++ b/lib/private/EventDispatcher/EventDispatcher.php
@@ -81,6 +81,9 @@ class EventDispatcher implements IEventDispatcher {
$this->addListener($eventName, $listener, $priority);
}
+ /**
+ * @deprecated
+ */
public function dispatch(string $eventName,
Event $event): void {
$this->dispatcher->dispatch($event, $eventName);
diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php
index b1e5aa86049..3bd74e719fb 100644
--- a/lib/private/EventDispatcher/SymfonyAdapter.php
+++ b/lib/private/EventDispatcher/SymfonyAdapter.php
@@ -87,7 +87,8 @@ class SymfonyAdapter implements EventDispatcherInterface {
// Event with no payload (object) need special handling
if ($newEvent === null) {
- return $this->eventDispatcher->getSymfonyDispatcher()->dispatch($eventName);
+ $this->eventDispatcher->getSymfonyDispatcher()->dispatch($eventName);
+ return new Event();
}
// Flip the argument order for Symfony to prevent a trigger_error