diff --git a/includes/Hooks/ParserFileProcessingHookHandlers.php b/includes/Hooks/ParserFileProcessingHookHandlers.php index 13b34c2..dc34909 100644 --- a/includes/Hooks/ParserFileProcessingHookHandlers.php +++ b/includes/Hooks/ParserFileProcessingHookHandlers.php @@ -12,13 +12,13 @@ use MediaWiki\Hook\ParserTestGlobalsHook; use MediaWiki\Http\HttpRequestFactory; use MediaWiki\Linker\LinksMigration; use MediaWiki\Page\PageReference; +use MediaWiki\Parser\ParserOutput; +use MediaWiki\Title\TitleFactory; use PageImages\PageImageCandidate; use PageImages\PageImages; use Parser; -use ParserOutput; use RepoGroup; use RuntimeException; -use TitleFactory; use WANObjectCache; use Wikimedia\Rdbms\IConnectionProvider; diff --git a/includes/PageImages.php b/includes/PageImages.php index 35ed866..1fc3d52 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -12,10 +12,10 @@ use MediaWiki\Cache\CacheKeyHelper; use MediaWiki\Hook\BeforePageDisplayHook; use MediaWiki\Hook\InfoActionHook; use MediaWiki\MediaWikiServices; +use MediaWiki\Output\OutputPage; use MediaWiki\Request\FauxRequest; use MediaWiki\Title\Title; use MediaWiki\User\Options\UserOptionsLookup; -use OutputPage; use RepoGroup; use Skin; use Wikimedia\Rdbms\IConnectionProvider; diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 15fca3e..31697e0 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -2,6 +2,7 @@ namespace PageImages\Tests; +use MediaWiki\Config\HashConfig; use MediaWiki\MediaWikiServices; use MediaWiki\Title\Title; use PageImages\ApiQueryPageImages; @@ -24,7 +25,7 @@ use Wikimedia\TestingAccessWrapper; class ApiQueryPageImagesTest extends TestCase { private function newInstance() { - $config = new \HashConfig( [ + $config = new HashConfig( [ 'PageImagesAPIDefaultLicense' => 'free' ] ); diff --git a/tests/phpunit/Hooks/ParserFileProcessingHookHandlersTest.php b/tests/phpunit/Hooks/ParserFileProcessingHookHandlersTest.php index 5143ddf..a3c344d 100644 --- a/tests/phpunit/Hooks/ParserFileProcessingHookHandlersTest.php +++ b/tests/phpunit/Hooks/ParserFileProcessingHookHandlersTest.php @@ -6,6 +6,7 @@ use File; use MediaWiki\Http\HttpRequestFactory; use MediaWiki\Linker\LinksMigration; use MediaWiki\Title\Title; +use MediaWiki\Title\TitleFactory; use MediaWikiIntegrationTestCase; use PageImages\Hooks\ParserFileProcessingHookHandlers; use PageImages\PageImageCandidate; @@ -13,7 +14,6 @@ use PageImages\PageImages; use Parser; use ParserOptions; use RepoGroup; -use TitleFactory; use WANObjectCache; use Wikimedia\Rdbms\IConnectionProvider; use Wikimedia\TestingAccessWrapper; diff --git a/tests/phpunit/PageImagesTest.php b/tests/phpunit/PageImagesTest.php index 829d4e1..8f6a305 100644 --- a/tests/phpunit/PageImagesTest.php +++ b/tests/phpunit/PageImagesTest.php @@ -3,10 +3,11 @@ namespace PageImages\Tests; use IContextSource; +use MediaWiki\Config\HashConfig; +use MediaWiki\Output\OutputPage; use MediaWiki\Request\FauxRequest; use MediaWiki\Title\Title; use MediaWikiIntegrationTestCase; -use OutputPage; use PageImages\PageImages; use SkinTemplate; @@ -119,7 +120,7 @@ class PageImagesTest extends MediaWikiIntegrationTestCase { $context->method( 'getTitle' ) ->willReturn( $this->newTitle() ); $fauxRequest = new FauxRequest(); - $config = new \HashConfig( $config ); + $config = new HashConfig( $config ); $context->method( 'getRequest' ) ->willReturn( $fauxRequest ); $context->method( 'getConfig' )