registration: Have wfLoadExtension() (and similar) use the queue
authorKunal Mehta <legoktm@gmail.com>
Mon, 30 Mar 2015 21:35:45 +0000 (14:35 -0700)
committerCatrope <roan.kattouw@gmail.com>
Tue, 31 Mar 2015 00:47:15 +0000 (00:47 +0000)
commit78fbe31c2bce68cc355bf417314df299dc833162
treea853e2fa9a847c6cd08309c8abc3f754fdc0529c
parent36e205b1fc97808dffc06e4d0719747f2bc97fcf
registration: Have wfLoadExtension() (and similar) use the queue

Right now wfLoadExtension() and related functions explicitly load
extensions immediately, bypassing the queue. This was done to be
extremely backwards-compatible with the old require_once style of
loading which does the same.

However, for a future configuration database to work, we need to be able
to reliably load extensions after configuration (LocalSettings.php) is
loaded, which is currently at the top of Setup.php. Rather than doing
this later, we should do this now to make sure the registration system
will be able to handle it.

In Wikimedia production, excentions are currently being loaded with
direct calls to:
  ExtensionRegistry::getInstance()->queue(...);
so we know that this should work, but that is not a nice API for sysadmins
and developers to be entering into LocalSettings.php.

If for some reason an extension really needs to be loaded immediately,
they can still call:
  ExtensionRegistry::getInstance()->loadFromQueue();
But that should be the exception, not the norm.

Change-Id: I72672e5c9541ede02d09f548c39ef6c8df0ec78a
includes/GlobalFunctions.php