From: Joas Schilling Date: Thu, 6 Jul 2023 08:52:19 +0000 (+0200) Subject: fix(dav): Move DAV app to non deprecated event dispatcher X-Git-Tag: v28.0.0beta1~744^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f59c74062ac8621ec939773d2edf92cf63259e87;p=nextcloud-server.git fix(dav): Move DAV app to non deprecated event dispatcher Signed-off-by: Joas Schilling --- 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);