From f59c74062ac8621ec939773d2edf92cf63259e87 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 6 Jul 2023 10:52:19 +0200 Subject: [PATCH] fix(dav): Move DAV app to non deprecated event dispatcher Signed-off-by: Joas Schilling --- apps/dav/lib/AppInfo/Application.php | 5 +++-- apps/dav/lib/CalDAV/CalDavBackend.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 10e1130f907..fb82e8a3afe 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -71,6 +71,7 @@ use OCA\DAV\Events\CardDeletedEvent; use OCA\DAV\Events\CardUpdatedEvent; use OCA\DAV\Events\SubscriptionCreatedEvent; use OCA\DAV\Events\SubscriptionDeletedEvent; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\Events\TrustedServerRemovedEvent; use OCA\DAV\HookManager; use OCA\DAV\Listener\ActivityUpdaterListener; @@ -215,7 +216,7 @@ class Application extends App implements IBootstrap { } public function registerHooks(HookManager $hm, - EventDispatcherInterface $dispatcher, + IEventDispatcher $dispatcher, IAppContainer $container, IServerContainer $serverContainer) { $hm->setup(); @@ -227,7 +228,7 @@ class Application extends App implements IBootstrap { } }); - $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($container) { + $dispatcher->addListener('OC\AccountManager::userUpdated', function ($event) use ($container) { $user = $event->getSubject(); /** @var SyncService $syncService */ $syncService = $container->query(SyncService::class); diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index c57d3a2764f..ef41301b840 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2841,7 +2841,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $calendarId = $shareable->getResourceId(); $calendarRow = $this->getCalendarById($calendarId); if ($calendarRow === null) { - throw new \RuntimeException('Trying to update shares for innexistant calendar: ' . $calendarId); + throw new \RuntimeException('Trying to update shares for non-existing calendar: ' . $calendarId); } $oldShares = $this->getShares($calendarId); -- 2.39.5