Page MenuHomePhabricator

Upgrade AbuseFilter extension to use newer phan
Closed, ResolvedPublic

Description

AbuseFilter needs to be upgraded to a newer version of phan, our PHP static analysis tool. This brings in
over 2 years of upstream improvements and lots of bug fixes.

Please follow the instructions on how to migrate at https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Add_phan_to_a_MediaWiki_extension#Migrating_from_phan_0.8.0.

Please also set the Gerrit topic for all patches related to this effort with new-phan-plz.

Event Timeline

Change 492530 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/AbuseFilter@master] [WIP] Migrate to new phan

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

Yes please! I tried this version of phan (or a similar one) on CodeClimate some time ago and it rocks!

Se we have:

  • a false positive in AbuseFilterHooks for which I filed https://github.com/phan/phan/issues/2504 and is fixed in 1.2.6.
  • several OOUI-related complaints, all related to function parameters, which I still have to look at
  • a couple of suppressable issues (one with preg_match on null, another for too many params to a function)
  • a few other troubles, mostly resolvable with docblock changes

Change 492530 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Migrate to new phan

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

Daimona claimed this task.
Daimona removed a project: Patch-For-Review.