jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/380316 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: Ia24dbf015f2b4781683ca980a460d0ac3e85674e
---
M composer.json
M includes/CommentStoreComment.php
M includes/context/ContextSource.php
M includes/context/DerivativeContext.php
M includes/context/IContextSource.php
M includes/context/RequestContext.php
M includes/import/WikiImporter.php
M includes/installer/MysqlUpdater.php
M includes/libs/rdbms/database/Database.php
M includes/libs/stats/NullStatsdDataFactory.php
M includes/session/Session.php
M maintenance/populatePPSortKey.php
M phpcs.xml
M tests/phan/config.php
M tests/phpunit/includes/MediaWikiServicesTest.php
M tests/phpunit/includes/auth/ThrottlerTest.php
16 files changed, 13 insertions(+), 19 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
Jforrester: Looks good to me, but someone else must approve
diff --git a/composer.json b/composer.json
index 34f9559..23ca850 100644
--- a/composer.json
+++ b/composer.json
@@ -54,7 +54,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"jetbrains/phpstorm-stubs":
"dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
"justinrainbow/json-schema": "~5.2",
- "mediawiki/mediawiki-codesniffer": "0.12.0",
+ "mediawiki/mediawiki-codesniffer": "13.0.0",
"monolog/monolog": "~1.22.1",
"nikic/php-parser": "2.1.0",
"nmred/kafka-php": "0.1.5",
diff --git a/includes/CommentStoreComment.php b/includes/CommentStoreComment.php
index 3920ba0..7ed86d6 100644
--- a/includes/CommentStoreComment.php
+++ b/includes/CommentStoreComment.php
@@ -20,8 +20,6 @@
* @file
*/
-use Wikimedia\Rdbms\IDatabase;
-
/**
* CommentStoreComment represents a comment stored by CommentStore. The fields
* should be considered read-only.
diff --git a/includes/context/ContextSource.php
b/includes/context/ContextSource.php
index cea8460..6530550 100644
--- a/includes/context/ContextSource.php
+++ b/includes/context/ContextSource.php
@@ -18,7 +18,6 @@
* @author Happy-melon
* @file
*/
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
use MediaWiki\MediaWikiServices;
/**
diff --git a/includes/context/DerivativeContext.php
b/includes/context/DerivativeContext.php
index 6e3eda6..82b97ec 100644
--- a/includes/context/DerivativeContext.php
+++ b/includes/context/DerivativeContext.php
@@ -18,7 +18,6 @@
* @author Daniel Friesen
* @file
*/
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
use MediaWiki\MediaWikiServices;
/**
diff --git a/includes/context/IContextSource.php
b/includes/context/IContextSource.php
index 895e9e4..5a856cf 100644
--- a/includes/context/IContextSource.php
+++ b/includes/context/IContextSource.php
@@ -21,8 +21,6 @@
* @file
*/
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
-
/**
* Interface for objects which can provide a MediaWiki context on request
*
diff --git a/includes/context/RequestContext.php
b/includes/context/RequestContext.php
index 4a772ee..7cabd40 100644
--- a/includes/context/RequestContext.php
+++ b/includes/context/RequestContext.php
@@ -22,7 +22,6 @@
* @file
*/
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php
index 9066079..a1f7e0c 100644
--- a/includes/import/WikiImporter.php
+++ b/includes/import/WikiImporter.php
@@ -23,7 +23,6 @@
* @file
* @ingroup SpecialPage
*/
-use MediaWiki\MediaWikiServices;
/**
* XML file reader for the page data importer.
diff --git a/includes/installer/MysqlUpdater.php
b/includes/installer/MysqlUpdater.php
index 556d0d5..10a5410 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -20,7 +20,6 @@
* @file
* @ingroup Deployment
*/
-use Wikimedia\Rdbms\Field;
use Wikimedia\Rdbms\MySQLField;
use MediaWiki\MediaWikiServices;
diff --git a/includes/libs/rdbms/database/Database.php
b/includes/libs/rdbms/database/Database.php
index e7417eb..65f84db 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1138,6 +1138,7 @@
*
* @param string $error Error text
* @param int $errno Error number
+ * @return bool
*/
protected function wasQueryTimeout( $error, $errno ) {
return false;
diff --git a/includes/libs/stats/NullStatsdDataFactory.php
b/includes/libs/stats/NullStatsdDataFactory.php
index d346f65..ed16311 100644
--- a/includes/libs/stats/NullStatsdDataFactory.php
+++ b/includes/libs/stats/NullStatsdDataFactory.php
@@ -2,7 +2,6 @@
use Liuggio\StatsdClient\Entity\StatsdData;
use Liuggio\StatsdClient\Entity\StatsdDataInterface;
-use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
/**
* @author Addshore
diff --git a/includes/session/Session.php b/includes/session/Session.php
index 23d9ab3..024bf9a 100644
--- a/includes/session/Session.php
+++ b/includes/session/Session.php
@@ -621,31 +621,37 @@
* @{
*/
+ /** @inheritDoc */
public function count() {
$data = &$this->backend->getData();
return count( $data );
}
+ /** @inheritDoc */
public function current() {
$data = &$this->backend->getData();
return current( $data );
}
+ /** @inheritDoc */
public function key() {
$data = &$this->backend->getData();
return key( $data );
}
+ /** @inheritDoc */
public function next() {
$data = &$this->backend->getData();
next( $data );
}
+ /** @inheritDoc */
public function rewind() {
$data = &$this->backend->getData();
reset( $data );
}
+ /** @inheritDoc */
public function valid() {
$data = &$this->backend->getData();
return key( $data ) !== null;
@@ -678,10 +684,12 @@
return $data[$offset];
}
+ /** @inheritDoc */
public function offsetSet( $offset, $value ) {
$this->set( $offset, $value );
}
+ /** @inheritDoc */
public function offsetUnset( $offset ) {
$this->remove( $offset );
}
diff --git a/maintenance/populatePPSortKey.php
b/maintenance/populatePPSortKey.php
index 7e3c2c3..366905a 100644
--- a/maintenance/populatePPSortKey.php
+++ b/maintenance/populatePPSortKey.php
@@ -23,8 +23,6 @@
require_once __DIR__ . '/Maintenance.php';
-use Wikimedia\Rdbms\IDatabase;
-
/**
* Usage:
* populatePPSortKey.php
diff --git a/phpcs.xml b/phpcs.xml
index bd9890b..29ddca3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,7 +7,6 @@
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.SpacingAfter" />
<exclude
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
<exclude
name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle"
/>
@@ -23,6 +22,9 @@
<exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase"
/>
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
+ <exclude
name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle"
/>
+ <exclude
name="MediaWiki.Usage.DeprecatedConstantUsage.NS_IMAGE" />
+ <exclude
name="MediaWiki.Usage.DeprecatedConstantUsage.NS_IMAGE_TALK" />
</rule>
<rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
<properties>
diff --git a/tests/phan/config.php b/tests/phan/config.php
index 8a82d74..ccc0177 100644
--- a/tests/phan/config.php
+++ b/tests/phan/config.php
@@ -1,7 +1,5 @@
<?php
-use \Phan\Config;
-
// If xdebug is enabled, we need to increase the nesting level for phan
ini_set( 'xdebug.max_nesting_level', 1000 );
diff --git a/tests/phpunit/includes/MediaWikiServicesTest.php
b/tests/phpunit/includes/MediaWikiServicesTest.php
index 9eae643..f6bc209 100644
--- a/tests/phpunit/includes/MediaWikiServicesTest.php
+++ b/tests/phpunit/includes/MediaWikiServicesTest.php
@@ -1,5 +1,4 @@
<?php
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
use MediaWiki\Interwiki\InterwikiLookup;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Linker\LinkRendererFactory;
@@ -7,7 +6,6 @@
use MediaWiki\Services\DestructibleService;
use MediaWiki\Services\SalvageableService;
use MediaWiki\Services\ServiceDisabledException;
-use Wikimedia\Rdbms\LBFactory;
/**
* @covers MediaWiki\MediaWikiServices
diff --git a/tests/phpunit/includes/auth/ThrottlerTest.php
b/tests/phpunit/includes/auth/ThrottlerTest.php
index f52048a..f963ad9 100644
--- a/tests/phpunit/includes/auth/ThrottlerTest.php
+++ b/tests/phpunit/includes/auth/ThrottlerTest.php
@@ -4,7 +4,6 @@
use BagOStuff;
use HashBagOStuff;
-use InvalidArgumentException;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
--
To view, visit https://gerrit.wikimedia.org/r/380316
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia24dbf015f2b4781683ca980a460d0ac3e85674e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits