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

juliusknorr
Copy link
Member

@juliusknorr juliusknorr 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

@juliusknorr juliusknorr force-pushed the chore/comments-event-legacy branch from 6a16461 to 15a0c0a Compare June 18, 2024 12:27
}

$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
@juliusknorr juliusknorr force-pushed the chore/comments-event-legacy branch from 15a0c0a to 2a3977e Compare June 18, 2024 13:28
@juliusknorr juliusknorr force-pushed the chore/comments-event-legacy branch 4 times, most recently from f7563df to 9da9819 Compare June 26, 2024 12:48
@juliusknorr juliusknorr force-pushed the chore/comments-event-legacy branch from 9da9819 to 536468e Compare June 26, 2024 14:40
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the chore/comments-event-legacy branch from 536468e to 9713dd3 Compare June 26, 2024 16:13
@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