From: James D. Forrester Date: Fri, 11 Oct 2019 16:30:40 +0000 (-0700) Subject: build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0 X-Git-Tag: 1.34.0-rc.1~24 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e65f8ac5110804067366f9f239c13f4f29b66c3d build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0 Newly-disabled general rules: * MediaWiki.Commenting.FunctionComment.MissingSplatVariadicArg * MediaWiki.Commenting.FunctionComment.SuperfluousVariadicArgComment * MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedException * MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedExceptionMessage * MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedExceptionMessageRegExp * MediaWiki.Usage.NullableType.PHP71NullableStyle * MediaWiki.Usage.PHPUnitTypeHints.MissingTypehint * PSR12.Files.ImportStatement.LeadingSlash * PSR12.Properties.ConstantVisibility.NotFound Change-Id: Ifcf8c6d5fecc47a32741114b5a5b746a41510045 --- diff --git a/.phpcs.xml b/.phpcs.xml index f971881f38..c18063dff6 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,22 +2,32 @@ + - + + - + + + + + + + + + diff --git a/composer.json b/composer.json index 1597a411e9..22a82775de 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "jakub-onderka/php-console-highlighter": "0.3.2", "jakub-onderka/php-parallel-lint": "0.9.2", "justinrainbow/json-schema": "~5.2", - "mediawiki/mediawiki-codesniffer": "26.0.0", + "mediawiki/mediawiki-codesniffer": "28.0.0", "monolog/monolog": "~1.24.0", "nikic/php-parser": "3.1.5", "seld/jsonlint": "1.7.1", diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 2e7db78327..7ec0e2ea25 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -599,7 +599,9 @@ class ApiParse extends ApiBase { $pout = $page->getParserOutput( $popts, $revId, $suppressCache ); } if ( !$pout ) { - $this->dieWithError( [ 'apierror-nosuchrevid', $revId ?: $page->getLatest() ] ); // @codeCoverageIgnore + // @codeCoverageIgnoreStart + $this->dieWithError( [ 'apierror-nosuchrevid', $revId ?: $page->getLatest() ] ); + // @codeCoverageIgnoreEnd } return $pout; diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index bf5734a0f9..dc6e2e5592 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1162,7 +1162,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { protected function getLegacyShowHideFilters() { $filters = []; foreach ( $this->filterGroups as $group ) { - if ( $group instanceof ChangesListBooleanFilterGroup ) { + if ( $group instanceof ChangesListBooleanFilterGroup ) { foreach ( $group->getFilters() as $key => $filter ) { if ( $filter->displaysOnUnstructuredUi( $this ) ) { $filters[ $key ] = $filter; diff --git a/tests/phpunit/includes/api/ApiUploadTestCase.php b/tests/phpunit/includes/api/ApiUploadTestCase.php index cf56052a55..9d3e502dd2 100644 --- a/tests/phpunit/includes/api/ApiUploadTestCase.php +++ b/tests/phpunit/includes/api/ApiUploadTestCase.php @@ -121,7 +121,7 @@ abstract class ApiUploadTestCase extends ApiTestCase { return true; } - function fakeUploadChunk( $fieldName, $fileName, $type, & $chunkData ) { + public function fakeUploadChunk( $fieldName, $fileName, $type, &$chunkData ) { $tmpName = $this->getNewTempFile(); // copy the chunk data to temp location: if ( !file_put_contents( $tmpName, $chunkData ) ) {