From f8062128bf418c0590d1e2245cbf9edd7543b4d9 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 20 Oct 2024 13:21:02 +0200 Subject: [PATCH] Use namespaced classes Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: Ie195f1614237370a19e91bf4e16f704cee678c0c --- includes/Hooks.php | 6 +++--- includes/TemplateStylesContent.php | 2 +- includes/TemplateStylesContentHandler.php | 4 ++-- tests/phpunit/TemplateStylesContentTest.php | 3 +++ tests/phpunit/TemplateStylesHooksTest.php | 3 +++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 3b151b4..7fdd648 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -7,21 +7,21 @@ namespace MediaWiki\Extension\TemplateStyles; * @license GPL-2.0-or-later */ -use ContentHandler; -use ExtensionRegistry; use InvalidArgumentException; use MapCacheLRU; use MediaWiki\Config\Config; +use MediaWiki\Content\ContentHandler; use MediaWiki\Extension\TemplateStyles\Hooks\HookRunner; use MediaWiki\Hook\ParserClearStateHook; use MediaWiki\Hook\ParserFirstCallInitHook; use MediaWiki\Html\Html; use MediaWiki\MediaWikiServices; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\PPFrame; +use MediaWiki\Registration\ExtensionRegistry; use MediaWiki\Revision\Hook\ContentHandlerDefaultModelForHook; use MediaWiki\Revision\SlotRecord; use MediaWiki\Title\Title; -use PPFrame; use Wikimedia\CSS\Grammar\CheckedMatcher; use Wikimedia\CSS\Grammar\GrammarMatch; use Wikimedia\CSS\Grammar\MatcherFactory; diff --git a/includes/TemplateStylesContent.php b/includes/TemplateStylesContent.php index a89c445..1dd86e3 100644 --- a/includes/TemplateStylesContent.php +++ b/includes/TemplateStylesContent.php @@ -2,7 +2,7 @@ namespace MediaWiki\Extension\TemplateStyles; -use TextContent; +use MediaWiki\Content\TextContent; /** * @file diff --git a/includes/TemplateStylesContentHandler.php b/includes/TemplateStylesContentHandler.php index 4f61857..ae5146e 100644 --- a/includes/TemplateStylesContentHandler.php +++ b/includes/TemplateStylesContentHandler.php @@ -7,9 +7,9 @@ namespace MediaWiki\Extension\TemplateStyles; * @license GPL-2.0-or-later */ -use CodeContentHandler; -use Content; use CSSJanus; +use MediaWiki\Content\CodeContentHandler; +use MediaWiki\Content\Content; use MediaWiki\Content\Renderer\ContentParseParams; use MediaWiki\Content\ValidationParams; use MediaWiki\MediaWikiServices; diff --git a/tests/phpunit/TemplateStylesContentTest.php b/tests/phpunit/TemplateStylesContentTest.php index 240c61a..847eab3 100644 --- a/tests/phpunit/TemplateStylesContentTest.php +++ b/tests/phpunit/TemplateStylesContentTest.php @@ -1,5 +1,8 @@