Page MenuHomePhabricator

Upgrade phan/phan for our config
Closed, ResolvedPublic

Description

Our latest config, 0.6.1, runs with phan 1.3.4. In the meanwhile, phan got to the 2.2.5 version, which includes many improvements, and most notably drops PHP70 compatibility.

I see that currently, our phan config only requires PHP 5.6.99+, and phan is in the extra field. However, given that

  1. The config won't be usable if phan can't be installed (i.e. it's a real dependency)
  2. It already requires PHP70 to install phan
  3. We're dropping support for PHP5
  4. We already stopped testing with PHP70
  5. The PHP version of the test environment can be different from the production one

I propose to start requiring PHP71. This should then probably go in a 1.0.0 release.

Note that I already sent a patch for that, that will need review, some CI changes (both to make it pass, and to the docker image used to run phan), and moving phan to the require section per above. CC @Legoktm and @Umherirrender as main contributors.

Event Timeline

Change 519740 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/tools/phan@master] Upgrade phan, remove old config settings

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

Change 533628 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] Run PHP71+ jobs for mediawiki/tools/phan

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

Change 533628 merged by jenkins-bot:
[integration/config@master] Run PHP71+ jobs for mediawiki/tools/phan

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

Change 519740 merged by jenkins-bot:
[mediawiki/tools/phan@master] Upgrade phan, remove old config settings

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

Note there was also https://gerrit.wikimedia.org/r/#/c/mediawiki/tools/phan/+/531511/ (now merged) which I forgot to tag.

Anyway, let's not make this a tracking task. We can call it resolved as soon as the new version is released, and we confirm that it's usable in CI.

Change 533731 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/tools/phan@master] Restore PHP5.6 requirement

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

Change 533731 merged by jenkins-bot:
[mediawiki/tools/phan@master] Restore PHP5.6 requirement

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

...Re-released as 0.7.1. As I wrote on gerrit, I just realized that mediawiki-phan-config is in require-dev (unlike phan/phan for mediawiki-phan-config itself, or taint-check, both being in "extra"), and thus HHVM jobs will try to bring it in as well, and fail due to the requirement. So, left the requirement to PHP5.6 for now, until we drop HHVM. Note that we don't have to restore HHVM jobs for the phan-config repo.