Open main menu

Changes

no edit summary
Phan is a '''[[wp:Static program analysis|static analyzer]]''' for PHP. It apparently originated from Etsy. It will help you write better PHP code. Please note that your source code should follow best practices for directory layout<ref>Essentially, code should live in a 'src' or 'includes' directory; tests go in 'tests' etc. https://www.mediawiki.org/wiki/Best_practices_for_extensions#File_structure</ref>. To use it, you'll need to install the [https://github.com/nikic/php-ast Abstract Syntax Tree] PHP extension. See the [https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base tutorial for analyzing a large sloppy codebase]
[https://github.com/phan/phan Phan project on GitHub]
 
The [[MediaWiki]] project uses Phan in its [[Continuous Integration]].
After reading that and [https://github.com/wikimedia/mediawiki/blob/d0dae26538d7c5e178de2406e88738933da05f58/.phan/config.php the source of <code>./phan/config.php</code>], we figured out the full configuration, '''and''' that you can create your own overrides/customizations in a file called <code>./phan/local-config.php</code><br />
===== Fully parsed configuration =====
{{Collapsible
|visible_text=Show the full configuration for MediaWiki phan
https://github.com/phan/phan/tree/v5/tests/files/src
 <br />{{References}}<br />
[[Category:Tools]]