From: addshore Date: Tue, 18 Oct 2016 10:41:59 +0000 (+0100) Subject: MWServices load new ServiceWiringFiles after ExtRegistry load X-Git-Tag: 1.31.0-rc.0~5084^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/wiki/supprimer.php?a=commitdiff_plain;h=cf6931f83be7ce799471d4fbbf123846681c7cdb;p=lhc%2Fweb%2Fwiklou.git MWServices load new ServiceWiringFiles after ExtRegistry load Extensions that include ServiceWiringFiles in their extension.json file do not currently get loaded. This is due to the resetGlobalInstance call after the extension.json files are loaded not reloading service wiring. Adding the 'load' param resolves this. The current sequence of events is as follows: - Setup.php - ExtensionRegistry::loadFromQueue - ExtensionRegistry::exportExtractedData - MediawikiServices::resetGlobalInstance This can be tested using the Cognate extension (linked in the ticket) which may be the first extension to use both extension registration while including service wiring files. Bug: T148419 Change-Id: Ic42ac8e28c66b79193bcafe332b1ef2ebc29742d --- diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index 7f94ced2c9..3a95676bef 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -182,7 +182,7 @@ class MediaWikiServices extends ServiceContainer { $oldInstance = self::$instance; - self::$instance = self::newInstance( $bootstrapConfig ); + self::$instance = self::newInstance( $bootstrapConfig, 'load' ); self::$instance->importWiring( $oldInstance, [ 'BootstrapConfig' ] ); if ( $quick === 'quick' ) {