-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move lib/ events to IEventDispatcher where possible #39571
Move lib/ events to IEventDispatcher where possible #39571
Conversation
457f1fd
to
8fba3b4
Compare
@@ -148,12 +143,18 @@ | |||
}); | |||
|
|||
// notifications api to accept incoming user shares | |||
$oldDispatcher->addListener('OCP\Share::postShare', function (OldGenericEvent $event) { | |||
$dispatcher->addListener('OCP\Share::postShare', function ($event) { | |||
if (!$event instanceof OldGenericEvent) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType Note
/** @var Listener $listener */ | ||
$listener = $this->getContainer()->query(Listener::class); | ||
$listener->shareNotification($event); | ||
}); | ||
$oldDispatcher->addListener(IGroup::class . '::postAddUser', function (OldGenericEvent $event) { | ||
$dispatcher->addListener(IGroup::class . '::postAddUser', function ($event) { | ||
if (!$event instanceof OldGenericEvent) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType Note
@@ -136,7 +134,7 @@ | |||
$groupManager->addBackend($groupBackend); | |||
|
|||
$userBackendRegisteredEvent = new UserBackendRegistered($userBackend, $userPluginManager); | |||
$legacyDispatcher->dispatch('OCA\\User_LDAP\\User\\User::postLDAPBackendAdded', $userBackendRegisteredEvent); | |||
$dispatcher->dispatch('OCA\\User_LDAP\\User\\User::postLDAPBackendAdded', $userBackendRegisteredEvent); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -153,7 +151,7 @@ | |||
); | |||
} | |||
|
|||
private function registerBackendDependents(IAppContainer $appContainer, EventDispatcherInterface $dispatcher) { | |||
private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher) { |
Check notice
Code scanning / Psalm
MissingReturnType Note
@@ -153,7 +151,7 @@ | |||
); | |||
} | |||
|
|||
private function registerBackendDependents(IAppContainer $appContainer, EventDispatcherInterface $dispatcher) { | |||
private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher) { |
Check notice
Code scanning / Psalm
DeprecatedInterface Note
8fba3b4
to
cd75dc0
Compare
Code is too deep for me. PHP CS check is unhappy though. |
1193b43
to
978cef9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you keep track of all removed legacy events to fill the upgrade documentation accordingly?
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
…itionalScripts Signed-off-by: Joas Schilling <[email protected]>
… Manager Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
978cef9
to
35c313e
Compare
Yes, will send a PR once the last remaining events are migrated. Todo list is: And can also be rechecked with the links on #38546 (comment) afterwards |
Docs in nextcloud/documentation#10858 |
Checklist