Add configuration for running etsy/phan against core
authorErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 1 Jul 2016 00:11:52 +0000 (17:11 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 8 Dec 2016 04:04:01 +0000 (20:04 -0800)
commitf5b4bd19b2719e039a8b6a9ec35f88c1385abca0
tree8066a5f6f504aa23cd906e98eb54194cce36f146
parent90538900208d227c360613cda8c7904ce2e9dacb
Add configuration for running etsy/phan against core

Adds the necessary configuration and stubs for phan static analysis to
run against mediawiki core. A variety of fixes have been applied to core
recently such with this current configuration we are completely passing,
except for one issue with a bug in Phan (https://github.com/etsy/phan/issues/286)

In it's current configuration Phan will detect fatal errors trying to
access non existant classes, undefined method calls, and other errors.
The analysis can be expanded as we cleanup more of the codebase.  This
is in preparation for working on getting the CI to run phan as part of
the review process. I have found phan to be usefull in CirrusSearch
(although with stricter config) for catching bugs and I think it could
help in core as well.

We arn't too far from being able to disable `null_casts_as_any_type`,
there are only a few classes that need adjusting. Lots more work needs
to be done to reduce `minimum_severity` from 10 to 5 (normal) or
0 (low).

Change-Id: Iafd55b1380f37d7b0d195eed081f8042166690e8
.gitignore
tests/phan/bin/phan [new file with mode: 0755]
tests/phan/config.php [new file with mode: 0644]
tests/phan/issues/.gitkeep [new file with mode: 0644]
tests/phan/stubs/README [new file with mode: 0644]
tests/phan/stubs/hhvm.php [new file with mode: 0644]
tests/phan/stubs/mail.php [new file with mode: 0644]
tests/phan/stubs/wikidiff.php [new file with mode: 0644]