Hey,
I'm curious what the list thinks of deprecating and eventually removing the Hooks class. Some relevant info:
/**
- Hooks class.
- Used to supersede $wgHooks, because globals are EVIL.
- @since 1.18
*/
https://github.com/wikimedia/mediawiki-core/blob/master/includes/Hooks.php#L...
I personally find the comment hilarious and hope you see why when looking at the "class". Looks like usage in core and extensions is not to extensive, so switching to something more sane seems quite feasible.
I second that!
Also I have an idea: maybe it would be good for mediawiki it the "initialisation state" along with all constants/global variables/extension metadata/preinitialised parser/preloaded PHP files, could be cached somewhere as the whole and just loaded on each request instead of being sequentially initialised? (extension metadata = hooks/special pages/i18n files/resource modules/credits/etc) If it's a good idea then I think sequential setting of hooks via a method call is not that good? (because hooks become even less "declarative"?) Or it's not worth it and the initialisation overhead is small?