Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / includes / deferred / WANCacheReapUpdate.php
index 604f205..b193d5f 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use MediaWiki\Linker\LinkTarget;
 use Psr\Log\LoggerInterface;
 use Wikimedia\Rdbms\IDatabase;
@@ -39,7 +40,7 @@ class WANCacheReapUpdate implements DeferrableUpdate {
 
        function doUpdate() {
                $reaper = new WANObjectCacheReaper(
-                       ObjectCache::getMainWANInstance(),
+                       MediaWikiServices::getInstance()->getMainWANObjectCache(),
                        ObjectCache::getLocalClusterInstance(),
                        [ $this, 'getTitleChangeEvents' ],
                        [ $this, 'getEventAffectedKeys' ],
@@ -113,7 +114,8 @@ class WANCacheReapUpdate implements DeferrableUpdate {
                }
 
                if ( $t->inNamespace( NS_FILE ) ) {
-                       $entities[] = wfLocalFile( $t->getText() );
+                       $entities[] = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
+                               ->newFile( $t->getText() );
                }
                if ( $t->inNamespace( NS_USER ) ) {
                        $entities[] = User::newFromName( $t->getText(), false );