mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-24 00:13:27 +00:00
Namespace the other two classes in PageImages
Leave alias for PageImages as it's used elsewhere... Change-Id: I4a3fa5f8aaafd87c78b03f04369a73f4b4f1b189
This commit is contained in:
parent
8747de0649
commit
b14685b8d5
|
@ -9,7 +9,7 @@
|
|||
"MediaWiki": ">= 1.35.0"
|
||||
},
|
||||
"APIPropModules": {
|
||||
"pageimages": "ApiQueryPageImages"
|
||||
"pageimages": "PageImages\\ApiQueryPageImages"
|
||||
},
|
||||
"MessagesDirs": {
|
||||
"PageImages": [
|
||||
|
@ -18,20 +18,20 @@
|
|||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"ApiQueryPageImages": "includes/ApiQueryPageImages.php",
|
||||
"PageImages": "includes/PageImages.php"
|
||||
"PageImages": "includes/PageImages.php",
|
||||
"PageImages\\PageImages": "includes/PageImages.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"PageImages\\": "includes/"
|
||||
},
|
||||
"Hooks": {
|
||||
"AfterParserFetchFileAndTitle": "PageImages\\Hooks\\ParserFileProcessingHookHandlers::onAfterParserFetchFileAndTitle",
|
||||
"ApiOpenSearchSuggest": "PageImages::onApiOpenSearchSuggest",
|
||||
"BeforePageDisplay": "PageImages::onBeforePageDisplay",
|
||||
"InfoAction": "PageImages::onInfoAction",
|
||||
"ApiOpenSearchSuggest": "PageImages\\PageImages::onApiOpenSearchSuggest",
|
||||
"BeforePageDisplay": "PageImages\\PageImages::onBeforePageDisplay",
|
||||
"InfoAction": "PageImages\\PageImages::onInfoAction",
|
||||
"LinksUpdate": "PageImages\\Hooks\\LinksUpdateHookHandler::onLinksUpdate",
|
||||
"ParserMakeImageParams": "PageImages\\Hooks\\ParserFileProcessingHookHandlers::onParserMakeImageParams",
|
||||
"SpecialMobileEditWatchlist::images": "PageImages::onSpecialMobileEditWatchlistImages"
|
||||
"ParserMakeImageParams": "PageImages\\PageImages\\Hooks\\ParserFileProcessingHookHandlers::onParserMakeImageParams",
|
||||
"SpecialMobileEditWatchlist::images": "PageImages\\PageImages::onSpecialMobileEditWatchlistImages"
|
||||
},
|
||||
"JobClasses": {
|
||||
"InitImageDataJob": "PageImages\\Job\\InitImageDataJob"
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace PageImages;
|
||||
|
||||
use ApiBase;
|
||||
use ApiQuery;
|
||||
use ApiQueryBase;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
* Expose image information for a page via a new prop=pageimages API.
|
||||
|
|
|
@ -11,7 +11,7 @@ use IDBAccessObject;
|
|||
use LinksUpdate;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Storage\SlotRecord;
|
||||
use PageImages;
|
||||
use PageImages\PageImages;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace PageImages;
|
||||
|
||||
use ApiBase;
|
||||
use ApiMain;
|
||||
use FauxRequest;
|
||||
use File;
|
||||
use IContextSource;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use OutputPage;
|
||||
use Skin;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
* @license WTFPL
|
||||
|
@ -227,3 +237,5 @@ class PageImages {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class_alias( PageImages::class, 'PageImages' );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace PageImages\Tests;
|
||||
|
||||
use ApiPageSet;
|
||||
use ApiQueryPageImages;
|
||||
use PageImages\ApiQueryPageImages;
|
||||
|
||||
class ApiQueryPageImagesProxyMock extends ApiQueryPageImages {
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ namespace PageImages\Tests;
|
|||
|
||||
require_once 'ApiQueryPageImagesProxyMock.php';
|
||||
|
||||
use ApiQueryPageImages;
|
||||
use PageImages;
|
||||
use PageImages\ApiQueryPageImages;
|
||||
use PageImages\PageImages;
|
||||
use Title;
|
||||
use Wikimedia\Rdbms\FakeResultWrapper;
|
||||
use Wikimedia\TestingAccessWrapper;
|
||||
|
@ -53,7 +53,7 @@ class ApiQueryPageImagesTest extends \PHPUnit\Framework\TestCase {
|
|||
|
||||
public function testConstructor() {
|
||||
$instance = $this->newInstance();
|
||||
$this->assertInstanceOf( 'ApiQueryPageImages', $instance );
|
||||
$this->assertInstanceOf( ApiQueryPageImages::class, $instance );
|
||||
}
|
||||
|
||||
public function testGetCacheMode() {
|
||||
|
@ -292,8 +292,8 @@ class ApiQueryPageImagesTest extends \PHPUnit\Framework\TestCase {
|
|||
|
||||
public function provideGetPropName() {
|
||||
return [
|
||||
[ 'free', \PageImages::PROP_NAME_FREE ],
|
||||
[ 'any', [ \PageImages::PROP_NAME_FREE, \PageImages::PROP_NAME ] ]
|
||||
[ 'free', \PageImages\PageImages::PROP_NAME_FREE ],
|
||||
[ 'any', [ \PageImages\PageImages::PROP_NAME_FREE, \PageImages\PageImages::PROP_NAME ] ]
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ namespace PageImages\Tests\Hooks;
|
|||
use LinksUpdate;
|
||||
use MediaWiki\Revision\RevisionRecord;
|
||||
use MediaWikiTestCase;
|
||||
use PageImages;
|
||||
use PageImages\Hooks\LinksUpdateHookHandler;
|
||||
use PageImages\PageImages;
|
||||
use ParserOutput;
|
||||
use RepoGroup;
|
||||
use Title;
|
||||
|
|
|
@ -5,12 +5,12 @@ namespace PageImages\Tests;
|
|||
use IContextSource;
|
||||
use MediaWikiTestCase;
|
||||
use OutputPage;
|
||||
use PageImages;
|
||||
use PageImages\PageImages;
|
||||
use SkinTemplate;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
* @covers PageImages
|
||||
* @covers \PageImages\PageImages
|
||||
*
|
||||
* @group PageImages
|
||||
* @group Database
|
||||
|
|
Loading…
Reference in a new issue