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

chore: Move comments event handler to use proper event dispatcher #45951

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Jun 18, 2024

Registering comments event handlers through the manager requires the comment manager to be initialized during app boot, which is something we can avoid by using the existing event dispatcher to make the registration more lazy.

Checklist

}

$eventType = $event->getEvent();
if ($eventType === CommentsEvent::EVENT_ADD

Check notice

Code scanning / Psalm

DeprecatedConstant Note

Constant OCP\Comments\CommentsEvent::EVENT_ADD is deprecated
}

$applicableEvents = [
CommentsEvent::EVENT_PRE_UPDATE,

Check notice

Code scanning / Psalm

DeprecatedConstant Note

Constant OCP\Comments\CommentsEvent::EVENT_PRE_UPDATE is deprecated

$applicableEvents = [
CommentsEvent::EVENT_PRE_UPDATE,
CommentsEvent::EVENT_UPDATE,

Check notice

Code scanning / Psalm

DeprecatedConstant Note

Constant OCP\Comments\CommentsEvent::EVENT_UPDATE is deprecated
$applicableEvents = [
CommentsEvent::EVENT_PRE_UPDATE,
CommentsEvent::EVENT_UPDATE,
CommentsEvent::EVENT_DELETE,

Check notice

Code scanning / Psalm

DeprecatedConstant Note

Constant OCP\Comments\CommentsEvent::EVENT_DELETE is deprecated
@juliushaertl juliushaertl force-pushed the chore/comments-event-legacy branch 4 times, most recently from f7563df to 9da9819 Compare June 26, 2024 12:48
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@blizzz blizzz merged commit ff499a6 into master Jun 27, 2024
165 checks passed
@blizzz blizzz deleted the chore/comments-event-legacy branch June 27, 2024 10:40
@blizzz blizzz mentioned this pull request Jul 24, 2024
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.

3 participants