diff options
author | Daimona Eaytoy <daimona.wiki@gmail.com> | 2019-10-09 12:39:37 +0200 |
---|---|---|
committer | Jforrester <jforrester@wikimedia.org> | 2019-10-22 09:16:45 +0000 |
commit | ae424ce5da6604ba0e956362d084cb5acb436901 (patch) | |
tree | 48711eec505f7893c0d784488f89dd28c22ee232 | |
parent | 754d163e298993e9aa314dd94b915915afcbc84b (diff) | |
download | mediawikicore-ae424ce5da6604ba0e956362d084cb5acb436901.tar.gz mediawikicore-ae424ce5da6604ba0e956362d084cb5acb436901.zip |
build: Upgrade mediawiki-phan-config to 0.8.0
This is to ensure that the CI job is working with the new version.
Note: redundant_condition_detection should have worked as expected by
this version, but unfortunately it still has false positives.
Bug: T235049
Bug: T231636
Change-Id: Idaba6584cb5b2ff19b6455c7bbec6b89619ddbff
-rw-r--r-- | .phan/config.php | 3 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | includes/GlobalFunctions.php | 1 | ||||
-rw-r--r-- | includes/Rest/Handler/CompareHandler.php | 1 | ||||
-rw-r--r-- | includes/Rest/HeaderParser/IfNoneMatch.php | 2 | ||||
-rw-r--r-- | includes/Setup.php | 1 | ||||
-rw-r--r-- | includes/libs/objectcache/wancache/WANObjectCache.php | 1 | ||||
-rw-r--r-- | includes/libs/rdbms/database/Database.php | 1 | ||||
-rw-r--r-- | includes/media/IPTC.php | 1 |
9 files changed, 4 insertions, 9 deletions
diff --git a/.phan/config.php b/.phan/config.php index 0cccce737084..1fb66f044942 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -92,9 +92,6 @@ $cfg['exclude_analysis_directory_list'] = [ // @todo Enable when the issue above is resolved and we update our config! $cfg['redundant_condition_detection'] = false; -// @fixme TEMPORARY, remove this -unset( $cfg['plugins'][ array_search( 'UnusedSuppressionPlugin', $cfg['plugins'] ) ] ); - // Do not use aliases in core. // Use the correct name, because we don't need backward compatibility $cfg['enable_class_alias_support'] = false; diff --git a/composer.json b/composer.json index b67b95562f22..bd9978e755da 100644 --- a/composer.json +++ b/composer.json @@ -77,7 +77,7 @@ "wikimedia/avro": "1.9.0", "wikimedia/testing-access-wrapper": "~1.0", "wmde/hamcrest-html-matchers": "^0.1.0", - "mediawiki/mediawiki-phan-config": "0.7.1", + "mediawiki/mediawiki-phan-config": "0.8.0", "symfony/yaml": "4.3.4", "johnkary/phpunit-speedtrap": "^1.0 | ^2.0" }, diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index c9e924a52ce2..788b471008ad 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1127,7 +1127,6 @@ function wfLogProfilingData() { if ( isset( $ctx['forwarded_for'] ) || isset( $ctx['client_ip'] ) || isset( $ctx['from'] ) ) { - // @phan-suppress-next-line PhanTypeArraySuspiciousNullable $ctx['proxy'] = $_SERVER['REMOTE_ADDR']; } diff --git a/includes/Rest/Handler/CompareHandler.php b/includes/Rest/Handler/CompareHandler.php index 93da9ff1f1d1..2b210bf14c47 100644 --- a/includes/Rest/Handler/CompareHandler.php +++ b/includes/Rest/Handler/CompareHandler.php @@ -88,6 +88,7 @@ class CompareHandler extends Handler { private function getRevision( $paramName ) { if ( !isset( $this->revisions[$paramName] ) ) { $this->revisions[$paramName] = + // @phan-suppress-next-line PhanTypeArraySuspiciousNullable T235355 $this->revisionLookup->getRevisionById( $this->getValidatedParams()[$paramName] ); } return $this->revisions[$paramName]; diff --git a/includes/Rest/HeaderParser/IfNoneMatch.php b/includes/Rest/HeaderParser/IfNoneMatch.php index f1a9923250b1..3909bad61280 100644 --- a/includes/Rest/HeaderParser/IfNoneMatch.php +++ b/includes/Rest/HeaderParser/IfNoneMatch.php @@ -32,7 +32,7 @@ class IfNoneMatch extends HeaderParserBase { * getLastError(). * * @param string[] $headerList - * @return array + * @return array[] */ public function parseHeaderList( $headerList ) { $this->lastError = null; diff --git a/includes/Setup.php b/includes/Setup.php index fa473b0e5cc1..3cf55a491e38 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -389,7 +389,6 @@ $wgSkipSkins[] = 'apioutput'; if ( $wgLocalInterwiki ) { // Hard deprecated in 1.34. wfDeprecated( '$wgLocalInterwiki – use $wgLocalInterwikis instead', '1.23' ); - // @phan-suppress-next-line PhanUndeclaredVariableDim array_unshift( $wgLocalInterwikis, $wgLocalInterwiki ); } diff --git a/includes/libs/objectcache/wancache/WANObjectCache.php b/includes/libs/objectcache/wancache/WANObjectCache.php index 9c9da156ea39..a8633484199c 100644 --- a/includes/libs/objectcache/wancache/WANObjectCache.php +++ b/includes/libs/objectcache/wancache/WANObjectCache.php @@ -1311,7 +1311,6 @@ class WANObjectCache implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInt * - Cached or regenerated value version number or null if not versioned * - Timestamp of the current cached value at the key or null if there is no value * @note Callable type hints are not used to avoid class-autoloading - * @suppress PhanTypeArraySuspicious */ private function fetchOrRegenerate( $key, $ttl, $callback, array $opts ) { $checkKeys = $opts['checkKeys'] ?? []; diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index d419bd6ef01e..80c49fc3a771 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -2209,6 +2209,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $opts = $this->makeUpdateOptions( $options ); $sql = "UPDATE $opts $table SET " . $this->makeList( $values, self::LIST_SET ); + // @phan-suppress-next-line PhanTypeComparisonFromArray if ( $conds !== [] && $conds !== '*' ) { $sql .= " WHERE " . $this->makeList( $conds, self::LIST_AND ); } diff --git a/includes/media/IPTC.php b/includes/media/IPTC.php index c32db28a799c..683ded107a0a 100644 --- a/includes/media/IPTC.php +++ b/includes/media/IPTC.php @@ -36,7 +36,6 @@ class IPTC { * * @param string $rawData The app13 block from jpeg containing iptc/iim data * @return array IPTC metadata array - * @suppress PhanTypeArraySuspicious */ static function parse( $rawData ) { $parsed = iptcparse( $rawData ); |