Page MenuHomePhabricator

Replace $wgExtensionFunctions with a hook
Open, MediumPublic


$wgExtensionFunctions is an odd special case that behaves like a hook, but not quite. It could easily be deprecated and replaced with a hook. Migration of extensions that currently register ExtensionFunctions would be trivial.

Note that $wgExtensionFunctions are called late in Setup.php, after MediaWikiServices is initialized. There even is a hook called earlier, namely the SetupAfterCache hook. Adding a SetupComplete hook to replace $wgExtensionFunctions would be trivial.

Current uses: all | wikimedia

Event Timeline

daniel created this task.Jan 8 2021, 6:51 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 8 2021, 6:51 PM

Change 656368 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Add hook replacement for $wgExtensionFunctions

Ammarpad updated the task description. (Show Details)Jan 15 2021, 7:48 AM