Skip to content
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

fix!: Final round of moving to IEventDispatcher #39605

Merged
merged 11 commits into from Aug 4, 2023

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jul 27, 2023

Checklist

@nickvergessen nickvergessen added 3. to review Waiting for reviews technical debt pending documentation This pull request needs an associated documentation update labels Jul 27, 2023
@nickvergessen nickvergessen added this to the Nextcloud 28 milestone Jul 27, 2023
@nickvergessen nickvergessen self-assigned this Jul 27, 2023
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>
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>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/noid/final-events-cleanup branch from f9b3e16 to 3962cd0 Compare July 28, 2023 12:11
@@ -112,7 +113,7 @@
private function callForRegistrations() {
static $eventSent = false;
if (!$eventSent) {
\OC::$server->getEventDispatcher()->dispatch(
\OC::$server->get(IEventDispatcher::class)->dispatch(

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\EventDispatcher\IEventDispatcher::dispatch has been marked as deprecated
@nickvergessen nickvergessen removed the pending documentation This pull request needs an associated documentation update label Jul 28, 2023
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

lib/private/Share20/Manager.php Show resolved Hide resolved
@come-nc come-nc requested a review from Altahrim August 3, 2023 14:52
Comment on lines +124 to +128
if ($addToFavorite) {
$event = new NodeAddedToFavorite($user, $fileId, $path);
} else {
$event = new NodeRemovedFromFavorite($user, $fileId, $path);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

$event = $addToFavorite
    ? new NodeAddedToFavorite($user, $fileId, $path);
    : new NodeRemovedFromFavorite($user, $fileId, $path);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of inline-if when generating objects 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants