Page MenuHomePhabricator

Add NAME constant to hook interfaces
Open, Needs TriagePublic

Description

Background: Some hook names changed when moving from the old to the new hook system. This is because php does not support colon characters in interface names, therefore the colons were replaced with underscores. This can cause a confusing situation, where as an extension developer I wouldn't know whether the hook should go by its new interface name or its old name.

We should introduce an interface constant 'NAME' to clarify the name which the hook should always go by.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 22 2020, 11:52 PM
Krinkle moved this task from Untriaged to Meta on the MediaWiki-Core-Hooks board.Jul 24 2020, 9:26 PM

Change 626517 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/core@master] Add NAME constant to all hook interfaces

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

Change 626517 abandoned by Tim Starling:
[mediawiki/core@master] Add NAME constant to all hook interfaces

Reason:

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