From 1dcfe80ac3489f6d7bf1b309b9a269332eba936a Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 6 Feb 2022 22:43:56 +0000 Subject: [PATCH] Namespace SkinVector* PHP classes Namespaceless class aliases are left behind for migration purposes. They can be removed at a later date when dependant extensions and skins are fully updated. Bug: T301204 Change-Id: I2b37c1889ff862ec8bb41325fc9f654c673cd115 --- includes/SkinVector.php | 16 +++++++++++++--- includes/SkinVector22.php | 3 +-- includes/SkinVectorLegacy.php | 2 ++ skin.json | 7 +++---- tests/phpunit/integration/SkinVectorTest.php | 6 +++--- tests/phpunit/integration/VectorHooksTest.php | 1 + 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index c61290819..666de46cd 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -22,10 +22,18 @@ * @ingroup Skins */ +namespace Vector; + +use Action; +use ExtensionRegistry; +use Html; +use Linker; use MediaWiki\MediaWikiServices; -use Vector\Constants; -use Vector\Hooks; -use Vector\VectorServices; +use RuntimeException; +use SkinMustache; +use SkinTemplate; +use SpecialPage; +use Title; /** * Skin subclass for Vector that may be the new or old version of Vector. @@ -1015,3 +1023,5 @@ class SkinVector extends SkinMustache { ]; } } + +class_alias( SkinVector::class, 'SkinVector' ); diff --git a/includes/SkinVector22.php b/includes/SkinVector22.php index 4ffbb7a54..66b67ef89 100644 --- a/includes/SkinVector22.php +++ b/includes/SkinVector22.php @@ -1,7 +1,6 @@ 'vector' ] ); diff --git a/tests/phpunit/integration/VectorHooksTest.php b/tests/phpunit/integration/VectorHooksTest.php index b81b5851b..ad19a583b 100644 --- a/tests/phpunit/integration/VectorHooksTest.php +++ b/tests/phpunit/integration/VectorHooksTest.php @@ -9,6 +9,7 @@ use Vector\Constants; use Vector\FeatureManagement\FeatureManager; use Vector\Hooks; use Vector\HTMLForm\Fields\HTMLLegacySkinVersionField; +use Vector\SkinVector; /** * Integration tests for Vector Hooks.