From 90040f278acf41b712c040b67d37063aa38962a3 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 4 Jan 2024 22:22:49 +0100 Subject: [PATCH] Use namespaced classes Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I45053ede3898b5c886a8182659466d321126ac1f --- includes/ApiQueryExtracts.php | 4 ++-- tests/phpunit/ApiQueryExtractsTest.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php index 7427458..9c38411 100644 --- a/includes/ApiQueryExtracts.php +++ b/includes/ApiQueryExtracts.php @@ -6,8 +6,8 @@ use ApiBase; use ApiMain; use ApiQueryBase; use ApiUsageException; -use Config; -use ConfigFactory; +use MediaWiki\Config\Config; +use MediaWiki\Config\ConfigFactory; use MediaWiki\Languages\LanguageConverterFactory; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; diff --git a/tests/phpunit/ApiQueryExtractsTest.php b/tests/phpunit/ApiQueryExtractsTest.php index f2ab143..525819d 100644 --- a/tests/phpunit/ApiQueryExtractsTest.php +++ b/tests/phpunit/ApiQueryExtractsTest.php @@ -3,6 +3,8 @@ namespace TextExtracts\Test; use ILanguageConverter; +use MediaWiki\Config\ConfigFactory; +use MediaWiki\Config\HashConfig; use MediaWiki\Languages\LanguageConverterFactory; use MediaWiki\Title\Title; use MediaWikiCoversValidator; @@ -20,11 +22,11 @@ class ApiQueryExtractsTest extends \MediaWikiIntegrationTestCase { use MediaWikiCoversValidator; private function newInstance() { - $config = new \HashConfig( [ + $config = new HashConfig( [ 'ParserCacheExpireTime' => ExpirationAwareness::TTL_INDEFINITE, ] ); - $configFactory = $this->createMock( \ConfigFactory::class ); + $configFactory = $this->createMock( ConfigFactory::class ); $configFactory->method( 'makeConfig' ) ->with( 'textextracts' ) ->willReturn( $config );