<?php
-use MediaWiki\MediaWikiServices;
-
/**
* ExtensionRegistry class
*
// We use a try/catch because we don't want to fail here
// if $wgObjectCaches is not configured properly for APC setup
try {
- $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
+ // Don't use MediaWikiServices here to prevent instantiating it before extensions have
+ // been loaded
+ $cacheId = ObjectCache::detectLocalServerCache();
+ $cache = ObjectCache::newFromId( $cacheId );
} catch ( MWException $e ) {
$cache = new EmptyBagOStuff();
}
}
if ( isset( $info['AutoloadNamespaces'] ) ) {
$autoloadNamespaces += $this->processAutoLoader( $dir, $info['AutoloadNamespaces'] );
+ AutoLoader::$psr4Namespaces += $autoloadNamespaces;
}
// get all requirements/dependencies for this extension