Use namespaced classes

Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: Ie00aedfe607665e8a38ee4ce2475f25b82a1d8cf
This commit is contained in:
Umherirrender 2024-01-05 22:37:40 +01:00
parent 4644cc17bb
commit 15dbbe94d5
5 changed files with 9 additions and 7 deletions

View file

@ -12,13 +12,13 @@ use MediaWiki\Hook\ParserTestGlobalsHook;
use MediaWiki\Http\HttpRequestFactory; use MediaWiki\Http\HttpRequestFactory;
use MediaWiki\Linker\LinksMigration; use MediaWiki\Linker\LinksMigration;
use MediaWiki\Page\PageReference; use MediaWiki\Page\PageReference;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Title\TitleFactory;
use PageImages\PageImageCandidate; use PageImages\PageImageCandidate;
use PageImages\PageImages; use PageImages\PageImages;
use Parser; use Parser;
use ParserOutput;
use RepoGroup; use RepoGroup;
use RuntimeException; use RuntimeException;
use TitleFactory;
use WANObjectCache; use WANObjectCache;
use Wikimedia\Rdbms\IConnectionProvider; use Wikimedia\Rdbms\IConnectionProvider;

View file

@ -12,10 +12,10 @@ use MediaWiki\Cache\CacheKeyHelper;
use MediaWiki\Hook\BeforePageDisplayHook; use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Hook\InfoActionHook; use MediaWiki\Hook\InfoActionHook;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Output\OutputPage;
use MediaWiki\Request\FauxRequest; use MediaWiki\Request\FauxRequest;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\Options\UserOptionsLookup; use MediaWiki\User\Options\UserOptionsLookup;
use OutputPage;
use RepoGroup; use RepoGroup;
use Skin; use Skin;
use Wikimedia\Rdbms\IConnectionProvider; use Wikimedia\Rdbms\IConnectionProvider;

View file

@ -2,6 +2,7 @@
namespace PageImages\Tests; namespace PageImages\Tests;
use MediaWiki\Config\HashConfig;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use PageImages\ApiQueryPageImages; use PageImages\ApiQueryPageImages;
@ -24,7 +25,7 @@ use Wikimedia\TestingAccessWrapper;
class ApiQueryPageImagesTest extends TestCase { class ApiQueryPageImagesTest extends TestCase {
private function newInstance() { private function newInstance() {
$config = new \HashConfig( [ $config = new HashConfig( [
'PageImagesAPIDefaultLicense' => 'free' 'PageImagesAPIDefaultLicense' => 'free'
] ); ] );

View file

@ -6,6 +6,7 @@ use File;
use MediaWiki\Http\HttpRequestFactory; use MediaWiki\Http\HttpRequestFactory;
use MediaWiki\Linker\LinksMigration; use MediaWiki\Linker\LinksMigration;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\Title\TitleFactory;
use MediaWikiIntegrationTestCase; use MediaWikiIntegrationTestCase;
use PageImages\Hooks\ParserFileProcessingHookHandlers; use PageImages\Hooks\ParserFileProcessingHookHandlers;
use PageImages\PageImageCandidate; use PageImages\PageImageCandidate;
@ -13,7 +14,6 @@ use PageImages\PageImages;
use Parser; use Parser;
use ParserOptions; use ParserOptions;
use RepoGroup; use RepoGroup;
use TitleFactory;
use WANObjectCache; use WANObjectCache;
use Wikimedia\Rdbms\IConnectionProvider; use Wikimedia\Rdbms\IConnectionProvider;
use Wikimedia\TestingAccessWrapper; use Wikimedia\TestingAccessWrapper;

View file

@ -3,10 +3,11 @@
namespace PageImages\Tests; namespace PageImages\Tests;
use IContextSource; use IContextSource;
use MediaWiki\Config\HashConfig;
use MediaWiki\Output\OutputPage;
use MediaWiki\Request\FauxRequest; use MediaWiki\Request\FauxRequest;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWikiIntegrationTestCase; use MediaWikiIntegrationTestCase;
use OutputPage;
use PageImages\PageImages; use PageImages\PageImages;
use SkinTemplate; use SkinTemplate;
@ -119,7 +120,7 @@ class PageImagesTest extends MediaWikiIntegrationTestCase {
$context->method( 'getTitle' ) $context->method( 'getTitle' )
->willReturn( $this->newTitle() ); ->willReturn( $this->newTitle() );
$fauxRequest = new FauxRequest(); $fauxRequest = new FauxRequest();
$config = new \HashConfig( $config ); $config = new HashConfig( $config );
$context->method( 'getRequest' ) $context->method( 'getRequest' )
->willReturn( $fauxRequest ); ->willReturn( $fauxRequest );
$context->method( 'getConfig' ) $context->method( 'getConfig' )