Phan/local-config.php

From Freephile Wiki

The distributed .phan/config.php file contains an include at the bottom for this file. So, if you create this file in your MediaWiki $IP (Install Path) at .phan/local-config.php, then it will automatically be interpreted by phan when you run it on your MediaWiki codebase.

This example purposely ignores all 'core' MediaWiki for analysis, and adds a long list of extensions for analysis.


This is a sample 'local' configuration for Phan

<?php
// DO analyze every extension
$cfg['directory_list'] = array_merge(
	$cfg['directory_list'],
	[
		'extensions/AbuseFilter',
		'extensions/Arrays',
		'extensions/CategoryTree',
#		'extensions/CiteThisPage',
#		'extensions/CollapsibleVector',
#		'extensions/ConfirmEdit',
#		'extensions/ContributionScores',
#		'extensions/CreateUserPage',
#		'extensions/CSS',
#		'extensions/DataTransfer',
#		'extensions/DeleteBatch',
#		'extensions/DisplayTitle',
#		'extensions/FlexDiagrams',
#		'extensions/Gadgets',
#		'extensions/HeaderFooter',
#		'extensions/HeaderTabs',
#		'extensions/Html5mediator',
#		'extensions/Maps',
#		'extensions/Math',
#		'extensions/MediaFunctions',
#		'extensions/Mermaid',
#		'extensions/ModernTimeline',
#		'extensions/Network',
#		'extensions/Nuke',
#		'extensions/NumerAlpha',
#		'extensions/OATHAuth',
#		'extensions/OpenLayers',
#		'extensions/PdfHandler',
#		'extensions/PipeEscape',
#		'extensions/Poem',
#		'extensions/Renameuser',
#		'extensions/SecureLinkFixer',
#		'extensions/SemanticCompoundQueries',
#		'extensions/SemanticDependencyUpdater',
#		'extensions/SemanticDrilldown',
#		'extensions/SemanticExtraSpecialProperties',
#		'extensions/SemanticMediaWiki',
#		'extensions/SemanticResultFormats',
#		'extensions/SemanticScribunto',
#		'extensions/SimpleBatchUpload',
#		'extensions/SimpleMathJax',
#		'extensions/SpamBlacklist',
#		'extensions/SubpageFun',
#		'extensions/SubPageList',
#		'extensions/TalkRight',
#		'extensions/TitleBlacklist',
#		'extensions/Validator',
#		'extensions/VEForAll',
#		'extensions/WatchAnalytics',
#		'extensions/WhitelistPages',
#		'extensions/WhoIsWatching',
#		'extensions/WhosOnline',
#		'extensions/Widgets',
#		'extensions/Wiretap',
#		'extensions/YouTube',
##		'extensions/',
	]
);

// Do NOT analyze all the regular 'core' directories
$cfg['exclude_analysis_directory_list'] = array_merge(
	$cfg['exclude_analysis_directory_list'],
	[
		'includes/',
		'languages/',
		'maintenance/',
		'mw-config/',
		'resources/',
		'vendor/',
		'tests/common/',
		'tests/parser/',
		'tests/phpunit/mocks/',
	]
);
## To get a picture of the full configuration, just print it and exit.
# print_r( $cfg ); exit();