mediawiki/mediawiki-phan-config
Shared Phan configuration for MediaWiki projects. Provides two base configs: config.php for MediaWiki extensions/skins and config-library.php for external PHP libraries. Include the appropriate file and customize for your project; CI guidance linked on mediawiki.org.
Architecture fit is highly specific to MediaWiki ecosystem projects (extensions, skins, or PHP libraries). It is incompatible with standalone PHP applications or non-MediaWiki frameworks due to MediaWiki-specific rules (e.g., wfRunHooks() handling, global function conventions). For Wikimedia-connected projects, it aligns perfectly with their toolchain and standards.
Integration feasibility is moderate for MediaWiki projects via Composer but complicated by Gerrit-based development workflow. External contributors must use Gerrit for patches (not GitHub PRs), creating friction for non-Wikimedia teams. Requires PHP 8.1+ and Phan 6.0+ with strict dependency alignment.
Technical risk is low for MediaWiki projects (battle-tested by Wikimedia Foundation) but high for non-MediaWiki projects due to misconfigured rules causing false positives/negatives. Gerrit workflow introduces minor contributor friction but no runtime risks. Dependency on phan-taint-check-plugin adds security value but requires careful annotation management.
Key questions:
wfRunHooks())?Stack fit is native for Composer-based MediaWiki projects using Phan 6.0+. Integrates seamlessly with Wikimedia’s CI ecosystem (Jenkins, GitLab CI) and complementary tools like mediawiki-codesniffer and minus-x. Incompatible with non-Composer projects or tools like PHPStan/Psalm.
Migration path: Replace custom Phan configs with the package’s base config. Start by including config.php (for extensions/skins) or config-library.php (for standalone libraries) in phan.php, then incrementally override settings (e.g., directory_list, suppressions). Test locally with --debug before CI integration.
Compatibility: Requires PHP 8.1+ and Phan 6.0+. Works with MediaWiki 1.35+ but verify version-specific quirks (e.g., @phan-var annotations for dynamic code). Incompatible with older PHP versions or non-Composer projects. Must use phan-taint-check-plugin as a dependency for taint analysis.
Sequencing:
composer require --dev mediawiki/mediawiki-phan-configphan.php with base config inclusionHow can I help you explore Laravel packages today?