mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-27 17:50:53 +00:00
Use namespaced classes
Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I6b49b9837ed6d3dfdd8a4bc0420848c09fcb1540
This commit is contained in:
parent
b31bfd8fb2
commit
bbbcca4b38
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace PageImages;
|
namespace PageImages;
|
||||||
|
|
||||||
use ApiBase;
|
use MediaWiki\Api\ApiBase;
|
||||||
use ApiQuery;
|
use MediaWiki\Api\ApiQuery;
|
||||||
use ApiQueryBase;
|
use MediaWiki\Api\ApiQueryBase;
|
||||||
use MediaWiki\Page\PageReference;
|
use MediaWiki\Page\PageReference;
|
||||||
use MediaWiki\Page\PageReferenceValue;
|
use MediaWiki\Page\PageReferenceValue;
|
||||||
use RepoGroup;
|
use RepoGroup;
|
||||||
|
|
|
@ -21,7 +21,7 @@ use PageImages\PageImageCandidate;
|
||||||
use PageImages\PageImages;
|
use PageImages\PageImages;
|
||||||
use RepoGroup;
|
use RepoGroup;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use WANObjectCache;
|
use Wikimedia\ObjectCache\WANObjectCache;
|
||||||
use Wikimedia\Rdbms\IConnectionProvider;
|
use Wikimedia\Rdbms\IConnectionProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace PageImages;
|
namespace PageImages;
|
||||||
|
|
||||||
use ApiBase;
|
|
||||||
use ApiMain;
|
|
||||||
use File;
|
use File;
|
||||||
use MapCacheLRU;
|
use MapCacheLRU;
|
||||||
|
use MediaWiki\Api\ApiBase;
|
||||||
|
use MediaWiki\Api\ApiMain;
|
||||||
use MediaWiki\Api\Hook\ApiOpenSearchSuggestHook;
|
use MediaWiki\Api\Hook\ApiOpenSearchSuggestHook;
|
||||||
use MediaWiki\Cache\CacheKeyHelper;
|
use MediaWiki\Cache\CacheKeyHelper;
|
||||||
use MediaWiki\Config\Config;
|
use MediaWiki\Config\Config;
|
||||||
|
|
|
@ -6,6 +6,7 @@ if ( $IP === false ) {
|
||||||
}
|
}
|
||||||
require_once "$IP/maintenance/Maintenance.php";
|
require_once "$IP/maintenance/Maintenance.php";
|
||||||
|
|
||||||
|
use MediaWiki\Maintenance\Maintenance;
|
||||||
use MediaWiki\Title\Title;
|
use MediaWiki\Title\Title;
|
||||||
use PageImages\Job\InitImageDataJob;
|
use PageImages\Job\InitImageDataJob;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace PageImages\Tests;
|
namespace PageImages\Tests;
|
||||||
|
|
||||||
use ApiPageSet;
|
use MediaWiki\Api\ApiPageSet;
|
||||||
use PageImages\ApiQueryPageImages;
|
use PageImages\ApiQueryPageImages;
|
||||||
|
|
||||||
class ApiQueryPageImagesProxyMock extends ApiQueryPageImages {
|
class ApiQueryPageImagesProxyMock extends ApiQueryPageImages {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
namespace PageImages\Tests;
|
namespace PageImages\Tests;
|
||||||
|
|
||||||
|
use MediaWiki\Api\ApiMain;
|
||||||
|
use MediaWiki\Api\ApiPageSet;
|
||||||
|
use MediaWiki\Api\ApiQuery;
|
||||||
use MediaWiki\Config\HashConfig;
|
use MediaWiki\Config\HashConfig;
|
||||||
use MediaWiki\Context\IContextSource;
|
use MediaWiki\Context\IContextSource;
|
||||||
use MediaWiki\Page\PageReferenceValue;
|
use MediaWiki\Page\PageReferenceValue;
|
||||||
|
@ -34,12 +37,12 @@ class ApiQueryPageImagesTest extends MediaWikiIntegrationTestCase {
|
||||||
$context->method( 'getConfig' )
|
$context->method( 'getConfig' )
|
||||||
->willReturn( $config );
|
->willReturn( $config );
|
||||||
|
|
||||||
$main = $this->createMock( \ApiMain::class );
|
$main = $this->createMock( ApiMain::class );
|
||||||
$main->expects( $this->once() )
|
$main->expects( $this->once() )
|
||||||
->method( 'getContext' )
|
->method( 'getContext' )
|
||||||
->willReturn( $context );
|
->willReturn( $context );
|
||||||
|
|
||||||
$query = $this->createMock( \ApiQuery::class );
|
$query = $this->createMock( ApiQuery::class );
|
||||||
$query->expects( $this->once() )
|
$query->expects( $this->once() )
|
||||||
->method( 'getMain' )
|
->method( 'getMain' )
|
||||||
->willReturn( $main );
|
->willReturn( $main );
|
||||||
|
@ -92,7 +95,7 @@ class ApiQueryPageImagesTest extends MediaWikiIntegrationTestCase {
|
||||||
$expected[$id] = PageReferenceValue::localReference( $titleValue->getNamespace(), $titleValue->getDBkey() );
|
$expected[$id] = PageReferenceValue::localReference( $titleValue->getNamespace(), $titleValue->getDBkey() );
|
||||||
}
|
}
|
||||||
|
|
||||||
$pageSet = $this->createMock( \ApiPageSet::class );
|
$pageSet = $this->createMock( ApiPageSet::class );
|
||||||
$pageSet->method( 'getGoodPages' )
|
$pageSet->method( 'getGoodPages' )
|
||||||
->willReturn( $titles );
|
->willReturn( $titles );
|
||||||
$pageSet->method( 'getMissingTitlesByNamespace' )
|
$pageSet->method( 'getMissingTitlesByNamespace' )
|
||||||
|
|
|
@ -8,15 +8,15 @@ use MediaWiki\Config\HashConfig;
|
||||||
use MediaWiki\Http\HttpRequestFactory;
|
use MediaWiki\Http\HttpRequestFactory;
|
||||||
use MediaWiki\Linker\LinksMigration;
|
use MediaWiki\Linker\LinksMigration;
|
||||||
use MediaWiki\Parser\Parser;
|
use MediaWiki\Parser\Parser;
|
||||||
|
use MediaWiki\Parser\ParserOptions;
|
||||||
use MediaWiki\Title\Title;
|
use MediaWiki\Title\Title;
|
||||||
use MediaWiki\Title\TitleFactory;
|
use MediaWiki\Title\TitleFactory;
|
||||||
use MediaWikiIntegrationTestCase;
|
use MediaWikiIntegrationTestCase;
|
||||||
use PageImages\Hooks\ParserFileProcessingHookHandlers;
|
use PageImages\Hooks\ParserFileProcessingHookHandlers;
|
||||||
use PageImages\PageImageCandidate;
|
use PageImages\PageImageCandidate;
|
||||||
use PageImages\PageImages;
|
use PageImages\PageImages;
|
||||||
use ParserOptions;
|
|
||||||
use RepoGroup;
|
use RepoGroup;
|
||||||
use WANObjectCache;
|
use Wikimedia\ObjectCache\WANObjectCache;
|
||||||
use Wikimedia\Rdbms\IConnectionProvider;
|
use Wikimedia\Rdbms\IConnectionProvider;
|
||||||
use Wikimedia\TestingAccessWrapper;
|
use Wikimedia\TestingAccessWrapper;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue