diff options
author | Joas Schilling <coding@schilljs.com> | 2023-07-25 11:40:42 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-27 09:57:51 +0200 |
commit | 5bb6a7804f051111606be094f6ee183db0e3d2c7 (patch) | |
tree | c3b733aa1aeacf9bac566caf3dea6d93f1a79bdb /lib/private/App | |
parent | 4f7de8ed60f528c38af9e4ba988015e9e9abc5dc (diff) | |
download | nextcloud-server-5bb6a7804f051111606be094f6ee183db0e3d2c7.tar.gz nextcloud-server-5bb6a7804f051111606be094f6ee183db0e3d2c7.zip |
fix: Move AppManager events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/App')
-rw-r--r-- | lib/private/App/AppManager.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index b881d37440e..88044fbf7b6 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -59,7 +59,6 @@ use OCP\IUser; use OCP\IUserSession; use OCP\Settings\IManager as ISettingsManager; use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; class AppManager implements IAppManager { /** @@ -79,7 +78,6 @@ class AppManager implements IAppManager { private AppConfig $appConfig; private IGroupManager $groupManager; private ICacheFactory $memCacheFactory; - private EventDispatcherInterface $legacyDispatcher; private IEventDispatcher $dispatcher; private LoggerInterface $logger; @@ -110,7 +108,6 @@ class AppManager implements IAppManager { AppConfig $appConfig, IGroupManager $groupManager, ICacheFactory $memCacheFactory, - EventDispatcherInterface $legacyDispatcher, IEventDispatcher $dispatcher, LoggerInterface $logger) { $this->userSession = $userSession; @@ -118,7 +115,6 @@ class AppManager implements IAppManager { $this->appConfig = $appConfig; $this->groupManager = $groupManager; $this->memCacheFactory = $memCacheFactory; - $this->legacyDispatcher = $legacyDispatcher; $this->dispatcher = $dispatcher; $this->logger = $logger; } @@ -543,7 +539,7 @@ class AppManager implements IAppManager { $this->installedAppsCache[$appId] = 'yes'; $this->appConfig->setValue($appId, 'enabled', 'yes'); $this->dispatcher->dispatchTyped(new AppEnableEvent($appId)); - $this->legacyDispatcher->dispatch(ManagerEvent::EVENT_APP_ENABLE, new ManagerEvent( + $this->dispatcher->dispatch(ManagerEvent::EVENT_APP_ENABLE, new ManagerEvent( ManagerEvent::EVENT_APP_ENABLE, $appId )); $this->clearAppsCache(); @@ -597,7 +593,7 @@ class AppManager implements IAppManager { $this->installedAppsCache[$appId] = json_encode($groupIds); $this->appConfig->setValue($appId, 'enabled', json_encode($groupIds)); $this->dispatcher->dispatchTyped(new AppEnableEvent($appId, $groupIds)); - $this->legacyDispatcher->dispatch(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, new ManagerEvent( + $this->dispatcher->dispatch(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, new ManagerEvent( ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, $appId, $groups )); $this->clearAppsCache(); @@ -633,7 +629,7 @@ class AppManager implements IAppManager { } $this->dispatcher->dispatchTyped(new AppDisableEvent($appId)); - $this->legacyDispatcher->dispatch(ManagerEvent::EVENT_APP_DISABLE, new ManagerEvent( + $this->dispatcher->dispatch(ManagerEvent::EVENT_APP_DISABLE, new ManagerEvent( ManagerEvent::EVENT_APP_DISABLE, $appId )); $this->clearAppsCache(); |