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

Typed events for db:add-missing-… #39487

Merged
merged 7 commits into from
Jul 25, 2023

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jul 19, 2023

Summary

  • Instead of the last commit fix(db)!: Remove private legacy event because we can not keep it We could also add a "dispatchLegacy" to IEventDispatcher that allows to dispatch symfony's GenericEvent. However that one is also deprecated and will be dropped sooner or later. From my POV introducing yet another legacy layer is just too much (especially since I couldn't find any listeners), and dropping is the better option.

Checklist

@nickvergessen nickvergessen added this to the Nextcloud 28 milestone Jul 19, 2023
@nickvergessen nickvergessen self-assigned this Jul 19, 2023
@nickvergessen nickvergessen added the pending documentation This pull request needs an associated documentation update label Jul 19, 2023
@kesselb
Copy link
Contributor

kesselb commented Jul 19, 2023

Unrelated, but interesting: If you put your instance into maintenance mode to add missing indexes, apps cannot register their indexes because the app and event listener are not loaded, and the index is not added.1

Footnotes

  1. https://github.com/nextcloud/server/pull/37178

@nickvergessen nickvergessen force-pushed the feat/noid/typed-events-for-db_add-missing branch from d83bb94 to 96b1af7 Compare July 20, 2023 07:09
}
);
$eventDispatcher->addListener(AddMissingIndicesEvent::class, function (AddMissingIndicesEvent $event) {
$event->addMissingIndex(
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move this out to a dedicated listener class for core?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we do that in a follow up? Just trying to get closer to #38546 ^_^
cleaning up the core application is something for another day

Copy link
Member

Choose a reason for hiding this comment

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

Sure

Copy link
Member

Choose a reason for hiding this comment

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

for another day

Today?

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 feat/noid/typed-events-for-db_add-missing branch from 492d612 to ab70bbd Compare July 24, 2023 12:51
@nickvergessen nickvergessen merged commit f824d87 into master Jul 25, 2023
36 of 38 checks passed
@nickvergessen nickvergessen deleted the feat/noid/typed-events-for-db_add-missing branch July 25, 2023 11:37
@nickvergessen nickvergessen changed the title Feat/noid/typed events for db add missing Typed events for db:add-missing-… Jul 27, 2023
@nickvergessen nickvergessen removed the pending documentation This pull request needs an associated documentation update label Jul 28, 2023
@nickvergessen
Copy link
Member Author

Docs in nextcloud/documentation#10858

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.

7 participants