As part of the annual work to introduce focused architectural interventions into MediaWiki Core to improve and clarify the interaction between MediaWiki's core platform and its extensions, two main workstreams were created -- the introduction of events and an implementation of base notification system inside Core that unifies the notification interface between the Echo platform and internal mediawiki's notification (Enotif)
The two projects can be followed in
- T376063: Introduce a system of events and listeners into MediaWiki core (FY24/25, WE5.2.3 and WE5.2.5)
- T383979: WE5.2.10: Implement an interface for notifications in MediaWiki core and T383979: WE5.2.10: Implement an interface for notifications in MediaWiki core
As both projects aim to introduce interventions that help streamline the interfacing into MediaWiki Core, the also interface together, and this ticket explores the general relationship between the two pieces. There are some clear usage and relationships, but we should explore whether this extends to more use cases and relationships.
Basic relationship: Utilizing events for notification triggers
The most basic relationship for notifications is to utilize events to trigger notifications (instead of the current usage of Hooks). Events are asynchronous and are meant to announce an action, which is the behavior required to trigger notification.
Moving from utilizing Hooks (that are synchronous and involve internal MW context) to Events, can simplify the triggering of a notification (into Echo or into Core).