use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\DBUnexpectedError;
+// @phan-file-suppress PhanTypeMissingReturn false positives
/**
* Foreign file with an accessible MediaWiki database
*
}
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $fname = __METHOD__;
return $cache->getWithSetCallback(
$this->repo->getLocalCacheKey(
$touched
),
$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
- function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl ) {
+ function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
wfDebug( "Fetching shared description from $renderUrl\n" );
- $res = Http::get( $renderUrl, [], __METHOD__ );
+ $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+ get( $renderUrl, [], $fname );
if ( !$res ) {
$ttl = WANObjectCache::TTL_UNCACHEABLE;
}