build: Updating mediawiki/mediawiki-phan-config to 0.10.5

Change-Id: I343d2bae626a3903eb1e67c05bf5caef4314b7dd
This commit is contained in:
Umherirrender 2020-12-12 13:01:23 +01:00
parent f49e8f4f56
commit f46ca9a63c
20 changed files with 8 additions and 23 deletions

View file

@ -76,7 +76,7 @@
"johnkary/phpunit-speedtrap": "^3.1",
"justinrainbow/json-schema": "~5.2",
"mediawiki/mediawiki-codesniffer": "34.0.0",
"mediawiki/mediawiki-phan-config": "0.10.4",
"mediawiki/mediawiki-phan-config": "0.10.5",
"monolog/monolog": "~2.0.2",
"nikic/php-parser": "4.10.2",
"nmred/kafka-php": "0.1.5",

View file

@ -526,7 +526,6 @@ if ( $wgPHPSessionHandling !== 'enable' &&
if ( defined( 'MW_NO_SESSION' ) ) {
// If the entry point wants no session, force 'disable' here unless they
// specifically set it to the (undocumented) 'warn'.
// @phan-suppress-next-line PhanUndeclaredConstant
$wgPHPSessionHandling = MW_NO_SESSION === 'warn' ? 'warn' : 'disable';
}

View file

@ -1829,7 +1829,7 @@ abstract class ApiBase extends ContextSource {
if ( $m ) {
$m = new ApiHelpParamValueMessage(
$value,
// @phan-suppress-next-line PhanTypeMismatchArgument
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal
[ $m->getKey(), 'api-help-param-no-description' ],
$m->getParams(),
isset( $deprecatedValues[$value] )

View file

@ -220,6 +220,7 @@ class SquidPurgeClient {
$request[] = "User-Agent: " . Http::userAgent() . ' ' . __CLASS__;
// Two ''s to create \r\n\r\n
$request[] = '';
// @phan-suppress-next-line PhanPluginDuplicateAdjacentStatement
$request[] = '';
$this->requests[] = implode( "\r\n", $request );

View file

@ -176,6 +176,7 @@ abstract class FileJournal {
$entries = $this->doGetChangeEntries( $start, $limit ? $limit + 1 : 0 );
if ( $limit && count( $entries ) > $limit ) {
$last = array_pop( $entries ); // remove the extra entry
// @phan-suppress-next-line PhanTypeArraySuspiciousNullable $entries are never empty here
$next = $last['id']; // update for next call
} else {
$next = null; // end of list

View file

@ -51,8 +51,6 @@ class SetCookieCompat {
if ( $urlEncode ) {
return setcookie( $name, $value, $options );
} else {
// Phan has a new prototype for setcookie() but not yet for setrawcookie()
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
return setrawcookie( $name, $value, $options );
}
}

View file

@ -148,7 +148,6 @@ class MSCompoundFileReader {
$this->error( 'invalid signature: ' . bin2hex( $this->header['header_signature'] ),
self::ERROR_INVALID_SIGNATURE );
}
// @phan-suppress-next-line PhanTypeInvalidRightOperandOfIntegerOp
$this->sectorLength = 1 << $this->header['sector_shift'];
$this->readDifat();
$this->readDirectory();
@ -231,7 +230,6 @@ class MSCompoundFileReader {
}
private function readSector( $sectorId ) {
// @phan-suppress-next-line PhanTypeInvalidRightOperandOfIntegerOp
return $this->readOffset( $this->sectorOffset( $sectorId ), 1 << $this->header['sector_shift'] );
}

View file

@ -30,7 +30,6 @@ class MWPostgreSqlPlatform extends PostgreSqlPlatform {
/**
* @inheritDoc
* @suppress PhanParamSignatureRealMismatchHasNoParamType // Parameter widened by parent
* phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
*/
protected function _getCreateTableSQL( $name, $columns, array $options = [] ) {

View file

@ -117,7 +117,6 @@ class VirtualRESTServiceClient {
usort( $matches, $cmpFunc );
// Return the most specific prefix and corresponding service
// @phan-suppress-next-line PhanRedundantCondition
return $matches
? [ $matches[0], $this->getInstance( $matches[0] ) ]
: [ null, null ];

View file

@ -127,6 +127,7 @@ class GIFMetadataExtractor {
// Graphics Control Extension.
fread( $fh, 1 ); // Block size
// @phan-suppress-next-line PhanPluginDuplicateAdjacentStatement
fread( $fh, 1 ); // Transparency, disposal method, user input
$buf = fread( $fh, 2 ); // Delay, in hundredths of seconds.
@ -283,7 +284,6 @@ class GIFMetadataExtractor {
}
$buf = unpack( 'C', $data )[1];
$bpp = ( $buf & 7 ) + 1;
// @phan-suppress-next-line PhanTypeInvalidLeftOperandOfIntegerOp
$buf >>= 7;
$have_map = $buf & 1;

View file

@ -185,7 +185,6 @@ class WebPHandler extends BitmapHandler {
* Decodes a lossless chunk header
* @param string $header First few bytes of the header, expected to be at least 13 bytes long
* @return bool|array See WebPHandler::decodeHeader
* @suppress PhanTypeInvalidLeftOperandOfIntegerOp
*/
public static function decodeLosslessChunkHeader( $header ) {
// Bytes 0-3 are 'VP8L'

View file

@ -35,7 +35,7 @@ class PPDPart_Hash extends PPDPart {
} else {
$accum = [];
}
// @phan-suppress-next-line PhanTypeMismatchArgument
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal
parent::__construct( $accum );
}
}

View file

@ -344,7 +344,6 @@ final class SessionManager implements SessionManagerInterface {
public function getVaryHeaders() {
// @codeCoverageIgnoreStart
// @phan-suppress-next-line PhanUndeclaredConstant
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
@ -365,7 +364,6 @@ final class SessionManager implements SessionManagerInterface {
public function getVaryCookies() {
// @codeCoverageIgnoreStart
// @phan-suppress-next-line PhanUndeclaredConstant
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
@ -843,7 +841,6 @@ final class SessionManager implements SessionManagerInterface {
public function getSessionFromInfo( SessionInfo $info, WebRequest $request ) {
// @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) ) {
// @phan-suppress-next-line PhanUndeclaredConstant
if ( MW_NO_SESSION === 'warn' ) {
// Undocumented safety case for converting existing entry points
$this->logger->error( 'Sessions are supposed to be disabled for this entry point', [

View file

@ -2329,6 +2329,7 @@ abstract class Skin extends ContextSource {
}
while ( count( $wrapper ) > 0 ) {
$element = array_pop( $wrapper );
// @phan-suppress-next-line PhanTypeArraySuspiciousNullable
$html = Html::rawElement( $element['tag'], $element['attributes'] ?? null, $html );
}
}

View file

@ -480,9 +480,7 @@ class SpecialBlock extends FormSpecialPage {
$fields['NamespaceRestrictions']['default'] = implode( "\n", $namespaceRestrictions );
if (
// @phan-suppress-next-line PhanImpossibleCondition
empty( $pageRestrictions ) &&
// @phan-suppress-next-line PhanImpossibleCondition
empty( $namespaceRestrictions )
) {
$fields['Editing']['default'] = false;

View file

@ -304,7 +304,6 @@ class SpecialListGroupRights extends SpecialPage {
}
}
// @phan-suppress-next-line PhanImpossibleCondition
if ( empty( $r ) ) {
return '';
} else {

View file

@ -376,7 +376,7 @@ class ImageListPager extends TablePager {
* @note $asc is named $descending in IndexPager base class. However
* it is true when the order is ascending, and false when the order
* is descending, so I renamed it to $asc here.
* @param int $offset
* @param string $offset
* @param int $limit
* @param bool $order IndexPager::QUERY_ASCENDING or IndexPager::QUERY_DESCENDING
* @return IResultWrapper

View file

@ -369,7 +369,6 @@ class ZipDirectoryReader {
* Read the central directory at the given location
* @param int $offset
* @param int $size
* @suppress PhanTypeInvalidLeftOperandOfIntegerOp
*/
private function readCentralDirectory( $offset, $size ) {
$block = $this->getBlock( $offset, $size );

View file

@ -107,11 +107,9 @@ abstract class LanguageConverter implements ILanguageConverter {
) {
global $wgDisabledVariants;
$this->deprecatePublicProperty( 'mURLVariant', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mURLVariant', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mUcfirst', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mConvRuleTitle', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mURLVariant', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mUserVariant', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mHeaderVariant', '1.35', __CLASS__ );
$this->deprecatePublicProperty( 'mMaxDepth = 10', '1.35', __CLASS__ );

View file

@ -1245,7 +1245,6 @@ abstract class Maintenance {
*/
protected function afterFinalSetup() {
if ( defined( 'MW_CMDLINE_CALLBACK' ) ) {
// @phan-suppress-next-line PhanUndeclaredConstant
call_user_func( MW_CMDLINE_CALLBACK );
}
}