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
This commit is contained in:
Reedy 2022-02-06 22:43:56 +00:00
parent ec9ecbfb27
commit 1dcfe80ac3
6 changed files with 23 additions and 12 deletions

View File

@ -22,10 +22,18 @@
* @ingroup Skins * @ingroup Skins
*/ */
namespace Vector;
use Action;
use ExtensionRegistry;
use Html;
use Linker;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use Vector\Constants; use RuntimeException;
use Vector\Hooks; use SkinMustache;
use Vector\VectorServices; use SkinTemplate;
use SpecialPage;
use Title;
/** /**
* Skin subclass for Vector that may be the new or old version of Vector. * 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' );

View File

@ -1,7 +1,6 @@
<?php <?php
use Vector\Constants; namespace Vector;
use Vector\VectorServices;
/** /**
* @ingroup Skins * @ingroup Skins

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Vector;
/** /**
* @ingroup Skins * @ingroup Skins
* @package Vector * @package Vector

View File

@ -25,7 +25,7 @@
}, },
"ValidSkinNames": { "ValidSkinNames": {
"vector-2022": { "vector-2022": {
"class": "SkinVector22", "class": "Vector\\SkinVector22",
"args": [ "args": [
{ {
"name": "vector-2022", "name": "vector-2022",
@ -62,7 +62,7 @@
] ]
}, },
"vector": { "vector": {
"class": "SkinVector", "class": "Vector\\SkinVector",
"@args": "See SkinVector::__construct for more detail.", "@args": "See SkinVector::__construct for more detail.",
"args": [ "args": [
{ {
@ -109,8 +109,7 @@
}, },
"AutoloadClasses": { "AutoloadClasses": {
"SkinVector": "includes/SkinVector.php", "SkinVector": "includes/SkinVector.php",
"SkinVectorLegacy": "includes/SkinVectorLegacy.php", "Vector\\SkinVector": "includes/SkinVector.php"
"SkinVector22": "includes/SkinVector22.php"
}, },
"AutoloadNamespaces": { "AutoloadNamespaces": {
"Vector\\": "includes/" "Vector\\": "includes/"

View File

@ -6,8 +6,8 @@ use HashConfig;
use MediaWikiIntegrationTestCase; use MediaWikiIntegrationTestCase;
use ReflectionMethod; use ReflectionMethod;
use RequestContext; use RequestContext;
use SkinVector;
use Title; use Title;
use Vector\SkinVector;
use Wikimedia\TestingAccessWrapper; use Wikimedia\TestingAccessWrapper;
/** /**
@ -16,12 +16,12 @@ use Wikimedia\TestingAccessWrapper;
* @group Vector * @group Vector
* @group Skins * @group Skins
* *
* @coversDefaultClass \SkinVector * @coversDefaultClass \Vector\SkinVector
*/ */
class SkinVectorTest extends MediaWikiIntegrationTestCase { class SkinVectorTest extends MediaWikiIntegrationTestCase {
/** /**
* @return \SkinVector * @return SkinVector
*/ */
private function provideVectorTemplateObject() { private function provideVectorTemplateObject() {
$template = new SkinVector( [ 'name' => 'vector' ] ); $template = new SkinVector( [ 'name' => 'vector' ] );

View File

@ -9,6 +9,7 @@ use Vector\Constants;
use Vector\FeatureManagement\FeatureManager; use Vector\FeatureManagement\FeatureManager;
use Vector\Hooks; use Vector\Hooks;
use Vector\HTMLForm\Fields\HTMLLegacySkinVersionField; use Vector\HTMLForm\Fields\HTMLLegacySkinVersionField;
use Vector\SkinVector;
/** /**
* Integration tests for Vector Hooks. * Integration tests for Vector Hooks.