Currently (example), it goes by adding a list of extensions (with hardcoded path) to both $cfg['directory_list'] and $cfg['exclude_analysis_directory_list']. This has at least three problems:
- You have to keep the lists synced
- The path is hardcoded
- It doesn't exclude duplicated files. Locally, this is especially a problem if the other extensions have a vendor folder, as every vendor dependency is analyzed once per extension requiring it (leading to PhanRedefined* issues)
Perhaps we could have something like
$requiredExtensions = [ 'ExtA', 'ExtB' ]; require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
and the base config file would process $requiredExtensions, i.e. add path, filter vendor, etc. It would still be possible to specify dependencies manually.