-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Move lib/ events to IEventDispatcher where possible #39571
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
Conversation
457f1fd to
8fba3b4
Compare
| // 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
| }); | ||
| $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
|
|
||
| $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
| } | ||
|
|
||
| private function registerBackendDependents(IAppContainer $appContainer, EventDispatcherInterface $dispatcher) { | ||
| private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher) { |
Check notice
Code scanning / Psalm
MissingReturnType
| } | ||
|
|
||
| private function registerBackendDependents(IAppContainer $appContainer, EventDispatcherInterface $dispatcher) { | ||
| private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher) { |
Check notice
Code scanning / Psalm
DeprecatedInterface
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 <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…itionalScripts Signed-off-by: Joas Schilling <coding@schilljs.com>
… Manager Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
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