2017-12-25 13:17:20 +00:00
|
|
|
<?php
|
|
|
|
|
2019-03-17 23:46:06 +00:00
|
|
|
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
|
2019-05-19 11:09:54 +00:00
|
|
|
|
2018-02-15 20:38:56 +00:00
|
|
|
// Due to creation of Parser::$extCite property
|
|
|
|
$cfg['suppress_issue_types'][] = 'PhanUndeclaredProperty';
|
2017-12-25 13:17:20 +00:00
|
|
|
|
2024-01-17 20:43:07 +00:00
|
|
|
/**
|
|
|
|
* Quick implementation of a recursive directory list.
|
|
|
|
* @param string $dir The directory to list
|
|
|
|
* @param ?array &$result Where to put the result
|
|
|
|
*/
|
|
|
|
function wfCollectPhpFiles( string $dir, ?array &$result = [] ) {
|
2024-02-26 21:57:14 +00:00
|
|
|
if ( !is_dir( $dir ) ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
foreach ( scandir( $dir ) as $f ) {
|
|
|
|
if ( $f === '.' || $f === '..' ) {
|
|
|
|
continue;
|
2024-01-17 20:43:07 +00:00
|
|
|
}
|
2024-02-26 21:57:14 +00:00
|
|
|
$fullName = $dir . DIRECTORY_SEPARATOR . $f;
|
|
|
|
wfCollectPhpFiles( $fullName, $result );
|
|
|
|
if ( is_file( $fullName ) && preg_match( '/\.php$/D', $fullName ) ) {
|
|
|
|
$result[] = $fullName;
|
2024-01-17 20:43:07 +00:00
|
|
|
}
|
2024-02-26 21:57:14 +00:00
|
|
|
}
|
2024-01-17 20:43:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Exclude src/DOM in favour of .phan/stubs/DomImpl.php
|
|
|
|
wfCollectPhpFiles( "{$VP}/vendor/wikimedia/parsoid/src/DOM", $cfg['exclude_file_list'] );
|
|
|
|
|
2018-02-15 20:38:56 +00:00
|
|
|
return $cfg;
|