diff options
author | Joas Schilling <coding@schilljs.com> | 2023-05-31 14:15:52 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-06-02 08:08:24 +0200 |
commit | 6d076c1ee9f0cd2de7357df801c27b08a70b89a1 (patch) | |
tree | 6b73bdbfe84e19e6b1a655c24a5ee87e566b6531 /apps | |
parent | 5591da0b33f4f4ce50f289318c49595e116ba4a3 (diff) | |
download | nextcloud-server-6d076c1ee9f0cd2de7357df801c27b08a70b89a1.tar.gz nextcloud-server-6d076c1ee9f0cd2de7357df801c27b08a70b89a1.zip |
fix(dispatcher): Migrate to OCP event dispatcher before symfony/event-dispatcher upgrade
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lookup_server_connector/lib/AppInfo/Application.php | 8 | ||||
-rw-r--r-- | apps/systemtags/lib/AppInfo/Application.php | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/lookup_server_connector/lib/AppInfo/Application.php b/apps/lookup_server_connector/lib/AppInfo/Application.php index 806f3e327aa..edc2757c0a6 100644 --- a/apps/lookup_server_connector/lib/AppInfo/Application.php +++ b/apps/lookup_server_connector/lib/AppInfo/Application.php @@ -34,9 +34,9 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; -use OCP\AppFramework\IAppContainer; use OCP\IUser; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Psr\Container\ContainerInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App implements IBootstrap { @@ -56,8 +56,8 @@ class Application extends App implements IBootstrap { /** * @todo move the OCP events and then move the registration to `register` */ - private function registerEventListeners(EventDispatcher $dispatcher, - IAppContainer $appContainer): void { + private function registerEventListeners(EventDispatcherInterface $dispatcher, + ContainerInterface $appContainer): void { $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($appContainer) { /** @var IUser $user */ $user = $event->getSubject(); diff --git a/apps/systemtags/lib/AppInfo/Application.php b/apps/systemtags/lib/AppInfo/Application.php index fc318aa2f1e..a0aac7486d1 100644 --- a/apps/systemtags/lib/AppInfo/Application.php +++ b/apps/systemtags/lib/AppInfo/Application.php @@ -31,9 +31,9 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; +use OCP\EventDispatcher\IEventDispatcher; use OCP\SystemTag\ManagerEvent; use OCP\SystemTag\MapperEvent; -use Symfony\Component\EventDispatcher\EventDispatcher; class Application extends App implements IBootstrap { public const APP_ID = 'systemtags'; @@ -47,7 +47,7 @@ class Application extends App implements IBootstrap { } public function boot(IBootContext $context): void { - $context->injectFn(function (EventDispatcher $dispatcher) use ($context) { + $context->injectFn(function (IEventDispatcher $dispatcher) use ($context) { /* * @todo move the OCP events and then move the registration to `register` */ |