Page MenuHomePhabricator

setTemporaryHook() to accept both new and old hook names
Closed, DeclinedPublic

Description

When the new Hook system was implemented, hook names with colons were replace with underscores.
E.g. onContribsPager::reallyDoQuery to onContribsPager__reallyDoQuery.

It seems expected, that if an extension has a hook registered in the old format, calling setTemporaryHook() on the hook in the new format should still override the hook. This behavior does not occur as it stands and should be implemented.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 17 2020, 8:42 PM
nnikkhoui updated the task description. (Show Details)Jul 17 2020, 8:59 PM

Change 613730 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[mediawiki/core@master] setTemporaryHook() accept new and old style hook names

https://gerrit.wikimedia.org/r/613730

Change 613730 abandoned by Nikki Nikkhoui:
[mediawiki/core@master] WIP: setTemporaryHook() accept new and old style hook names

Reason:
Different Approach

https://gerrit.wikimedia.org/r/613730

Tagging the platform team for triage. I think this qualifies as a "small project", and it should have high priority, since we need this to enable extensions to effectively and confidently use the new hook system.

(Please set code project tags - thanks.)