Skip to content

fix!: Final round of moving to IEventDispatcher - #39605

Merged
nickvergessen merged 11 commits into
masterfrom
bugfix/noid/final-events-cleanup
Aug 4, 2023
Merged

fix!: Final round of moving to IEventDispatcher#39605
nickvergessen merged 11 commits into
masterfrom
bugfix/noid/final-events-cleanup

Conversation

@nickvergessen

@nickvergessennickvergessen commented Jul 27, 2023

Copy link
Copy Markdown
Member

Checklist

@nickvergessennickvergessen added 3. to review Waiting for reviews technical debt 🧱 🤔🚀 pending documentation This pull request needs an associated documentation update labels Jul 27, 2023
@nickvergessennickvergessen added this to the Nextcloud 28 milestone Jul 27, 2023
@nickvergessennickvergessen self-assigned this Jul 27, 2023
Comment threadlib/private/Collaboration/Resources/Listener.php Fixed
Comment threadapps/dav/lib/AppInfo/Application.php Fixed
@nickvergessen
nickvergessenforce-pushed the bugfix/noid/final-events-cleanup branch from 30b5d64 to f9b3e16CompareJuly 28, 2023 08:45
@nickvergessen
nickvergessen requested review from a team, ChristophWurst, come-nc, icewind1991, kesselb and nfebe and removed request for a teamJuly 28, 2023 08:45
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
nickvergessenforce-pushed the bugfix/noid/final-events-cleanup branch from f9b3e16 to 3962cd0CompareJuly 28, 2023 12:11
static $eventSent = false;
if (!$eventSent) {
\OC::$server->getEventDispatcher()->dispatch(
\OC::$server->get(IEventDispatcher::class)->dispatch(

Check notice

Code scanning / Psalm

DeprecatedMethod

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

@come-nccome-nc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹

Comment threadlib/private/Share20/Manager.php
@come-nc
come-nc requested a review from AltahrimAugust 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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit:

$event = $addToFavorite
? newNodeAddedToFavorite($user, $fileId, $path);
: newNodeRemovedFromFavorite($user, $fileId, $path);

Copy link
Copy Markdown
MemberAuthor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewstechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nickvergessen@Altahrim@github-advanced-security@come-nc