Page MenuHomePhabricator

Fix and unsuppress reported Phan errors on WikibaseLexeme
Closed, ResolvedPublic

Description

From Lexeme's .phan/config.php:

	'suppress_issue_types' => [
		// ...
		// Temporarily due to T226244
		"PhanParamTooFew",
		"PhanUndeclaredVariableDim",
		"PhanUnreferencedUseNormal",
		"PhanUndeclaredTypeThrowsType",
		"PhanRedefinedInheritedInterface",
		"PhanRedefinedExtendedClass",
		"PhanCommentParamWithoutRealParam",
		"PhanUndeclaredFunction",
		"PhanTypeMismatchDeclaredParam",
		"PhanTypeNoPropertiesForeach",
		// ...
	],

Without suppressing those errors, Phan (runner 1.3.4, mediawiki-phan-config 0.6.1) fails on Lexeme (T226244). Those were temporarily suppressed to unbreak the build pipeline.

Ideally, all of these checks should be unsuppressed and errors should be fixed. It can be that some will stay suppressed for much longer, in case there's a strong reason or blocker against fixing the reported errors.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 21 2019, 12:41 PM
alaa_wmde updated the task description. (Show Details)Jun 21 2019, 12:45 PM
alaa_wmde updated the task description. (Show Details)Jun 21 2019, 12:56 PM
Addshore triaged this task as Low priority.Jun 21 2019, 10:02 PM
Addshore moved this task from incoming to ready to go on the Wikidata board.Jun 21 2019, 10:52 PM

Change 518256 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/WikibaseLexeme@master] [WIP] Update phan, cleanup config

https://gerrit.wikimedia.org/r/518256

Daimona claimed this task.Jul 4 2019, 8:04 PM

Change 518256 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Update phan, cleanup config

https://gerrit.wikimedia.org/r/518256

Daimona closed this task as Resolved.Wed, Jul 31, 5:17 PM

After my patch, we have:

$cfg['suppress_issue_types'][] = 'PhanParamSignatureMismatch';
// False positives with methods taking nullables
$cfg['suppress_issue_types'][] = 'PhanParamReqAfterOpt';
// @todo Remove the next line once HHVM is gone. Many instances are on ArrayObjects, and on HHVM the
// coalesce operator doesn't behave well on them.
$cfg['suppress_issue_types'][] = 'PhanPluginDuplicateConditionalNullCoalescing';

The former is to avoid tons of false positives, ditto for the second, and the third one is HHVM-only, so calling this resolved.