Hi everyone,
I've written an RfC about changing the way extensions store metadata about themselves and also how we load them. It's at https://www.mediawiki.org/wiki/Requests_for_comment/Extension_registration.
A brief summary:
Extensions register a lot of things, like classes, hooks, special pages, configuration options, and plenty more. Currently all of these are usually stored in the extension's main entry point ($IP/extensions/Foo/Foo.php).
This creates two problems. First, it's difficult to tell what an extension is going to register without actually enabling the extension. Second, registration currently depends on global state ($wgHooks, $wgSpecialPages, etc.) which we are trying to move away from.
My proposal is that we store this information in a JSON file (I've provided an example on the RfC), and have MediaWiki read them when loading extensions. We would no longer use the current method of require_once "Foo.php";, but instead $wgEnableExtensions[] = 'foo';, and MediaWiki would take care of the rest.
Please leave any comments or thoughts you might have on the talk page.
Thanks, -- Legoktm