Page MenuHomePhabricator

Provide documentation on mediawiki.org on how to migrate Echo events into Mediawiki Notification
Closed, ResolvedPublic

Description

To help engineers and volunteers on migrating existing Echo notifications into the new system we should provide them a guide on how to migrate existing Notifications into the new system.
This documentation should contain information about:

  • Migrate away from user locators, instead pass recipient under Event::RECIPIENTS_IDX when possible
  • Migrate from Event::create() to new NotificationsService::notify()
  • Migrate away from Hooks to Middleware

Note: Middleware interface is still being discussed: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1125174

Event Timeline

We don't actually have a page on mediawiki.org about the new notifications system as a whole, which seems like a problem when we want to write a page about migrating to it from the other system. I think I'll have to start by writing that page first.

Per a request from Piotr to give some advice here, I think Manual:Notifications on mediawiki.org (new page) would be a good place for documentation about the new notifications system. I'd suggest starting the migration guide on that same page, and then, if the migration guide content gets too long, it can be moved to Manual:Notifications/Migration.

Also, it looks like there's an existing navigation template for notification-related pages: https://www.mediawiki.org/wiki/Template:MediaWiki_notification_systems So it would be good to add the new page there and include the template on the new page.

pmiazga renamed this task from Provide documentation on mediawiki.org on how to migrate Echo events into Mediawiki Notificaton to Provide documentation on mediawiki.org on how to migrate Echo events into Mediawiki Notification.Mar 31 2025, 1:06 PM

I created the new page at https://www.mediawiki.org/wiki/Manual:Notifications, where I briefly documented the new system in general, and more precisely documented the code changes related to Event::RECIPIENTS_IDX and NotificationsService::notify(). I updated https://www.mediawiki.org/wiki/Extension:Echo/Creating_a_new_notification_type too to document Event::RECIPIENTS_IDX and provide more modern examples.

I didn't document the middleware yet, since we have no examples yet, and the system may still change. It should be easier to add this once we have working code in production. (perhaps I can convince @pmiazga to write that part)

I also wrote https://www.mediawiki.org/wiki/Enotif (somehow we did not have a page that described this system in one place), and updated https://www.mediawiki.org/wiki/Template:MediaWiki_notification_systems (thanks for that link @apaskulin) and a bunch of other pages linked from those.