Page MenuHomePhabricator

Local Phan errors that don't show up on CI
Open, Needs TriagePublic

Description

When I run Phan locally following https://www.mediawiki.org/wiki/Continuous_integration/Phan#Manual to install it, I get errors on current master that do not show up on CI.

CI seems to use 0.8.0 so that could be related. I could not run 0.8.0 locally due to some PHP configuration things. But see my config below:

PHP 7.1.8
php-ast 0.1.5
Phan 0.8.5

see issues

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2017, 6:52 PM

@Addshore or @EBernhardson may know. Most probably the errors and warnings have been introduced between 8.0 and 8.5. Surely one could look at bumping us to 8.5 but that requires pass on all repositories having phan enabled.

So yes, we are running 0.8 in CI https://github.com/wikimedia/integration-config/blob/69d77c16a6708def637a210e96d5f28aa44740f2/jjb/mediawiki.yaml#L458 and I guess these issues come from sniffs added / altered in 0.8+.

When CI updates to 0.8.5 these issues will surface / block CI so I guess we could just add them to the phan.config as ignored already? even though CI doesnt run 8.5?

Change 370682 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/core@master] Suppress more phan issues

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

I at least started doing that in ^

@hashar: @WMDE-leszek and me will try to update the version to 0.8.5 because currently it's a pain to have this configuration running with 0.8.0 locally. At least on Ubuntu 16.04

Change 371032 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/TwoColConflict@master] Minor fix for phan 0.8.5

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

Change 371041 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Cognate@master] Minor fix for phan 0.8.5

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

Change 371044 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/ElectronPdfService@master] Minor fix for phan 0.8.5

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

Change 371041 merged by jenkins-bot:
[mediawiki/extensions/Cognate@master] Minor fix for phan 0.8.5

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

Change 371032 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Minor fix for phan 0.8.5

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

Change 371078 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/LoginNotify@master] Minor fix for phan 0.8.5

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

Change 371098 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Wikibase@master] Update suppressed issues for phan 0.8.5

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

Addshore added a comment.EditedAug 15 2017, 12:42 AM

So, @Legoktm and I worked on something to enable you to define the phan version that an extension should run based on a value in composer.json

A script to create the version was merged @ https://gerrit.wikimedia.org/r/#/c/371095/ and a patch to modify the job is at https://gerrit.wikimedia.org/r/#/c/371097/ and ready for review.

Change 371078 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@master] Minor fix for phan 0.8.5

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

Change 371098 abandoned by WMDE-Fisch:
Update suppressed issues for phan 0.8.5

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

Change 371044 abandoned by WMDE-Fisch:
Minor fix for phan 0.8.5

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

Change 370682 abandoned by WMDE-Fisch:
Update suppressed phan issues found with 0.8.5

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