Currently EventBus uses the hooks API for sending mediawiki/page/change events
that represent changes to the current state of how a MediaWiki Page
looks to a non-logged-in / anonymous / public user.
We should refactor the use of hooks and adopt the new Domain Events API instead.
This means replacing the PageChangeHooks implementation with their respective event listeners:
PageSaveCompleteHook.
AC:
Not that at the time of writing not all hooks have been implemented (2025-04)
- PageSaveCompleteHook has been replaced with PageRevisionUpdatedEvent
- PageMoveCompleteHook has been replaced with PageMovedEvent
- PageDeleteCompleteHook has been replaced with PageDeletedEvent
- PageUndeleteCompleteHook has been replaced with ...
- PageDeleteHook has been replaced with PageDeletedEvent
- ArticleRevisionVisibilitySetHook has been replaced with {}.
Things to keep in mind (input from @daniel ):
- We don't need and EventIngress class per listener, but a generic one for all page state changes (PageStateIngress?)
- we might need to share code between hooks and listeners. This will require some ad hoc service wiring. Growth's implementation has examples we can piggyback on
- ImportableOldRevisionImporter could give some inspiration on how to implement an integration test strategy