[MediaWiki continuous integration](https://www.mediawiki.org/wiki/Continuous_integration) now runs Phan.
[Phan](https://github.com/etsy/phan) is a static code analyser for PHP.
Phan highlighted a lot of issues.
Until those issues are fixed in the MediaWiki core code repository, these issues have been temporarily suppressed (so they will not be shown) in the `suppress_issue_types` array [in Phan's config.php file](https://phabricator.wikimedia.org/diffusion/MW/browse/master/tests/phan/config.php;fbb1f742435c1d1eb3b31bf980e0682fc509b8c2$295).
* PHP 7+
* php-ast extension
** For others, including Windows and building from source see [upstream documentation](https://github.com/nikic/php-ast/blob/master/README.md#installation)
You are expected to
* have some basic understanding of PHP
* [install Phan](https://www.mediawiki.org/wiki/Continuous_integration/Phan#Installing_Phan) locally
* manually remove some issue types from the `suppress_issue_types` array
* [run Phan](https://www.mediawiki.org/wiki/Continuous_integration/Phan#Running_Phan) locally
* check Phan's output
* fix 10-20 of the errors in the output
* submit your patch in Wikimedia Gerrit. Make sure the [commit message](https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines) has the line "Bug: T153252"
If you run into any problems with Phan, please ask on [Phan's Discussion page on the wiki](https://www.mediawiki.org/wiki/Talk:Continuous_integration/Phan) (as there will be more people seeing it than on the GCI site.)