`integration/jenkins.git` has a MediaWiki configuration snippet to detect and load MediaWiki extensions ([[ https://phabricator.wikimedia.org/diffusion/CIJE/browse/master/mediawiki/conf.d/50_mw_ext_loader.php | mediawiki/config.d/50_mw_ext_loader.php ]]) . The same mechanism exists in MediaWiki core itself and CI should rely on it instead.
For the context, we used to have Jenkins build reusing workspaces, hence differents set of extensions were left behind being build. The config snippet is instructed by Zuul for a list of extensions to include via a file `extensions_load.txt`, the others present on the disk were not loaded. The then detects whether there is an `extension.json` or an expected entry point then `wfLoadExtensions()` or `require_once`.
Nowadays we start with a clean workspace so that system is no more needed.
We would need:
[X] MediaWiki install.php to be able to inject extensions just like the WebInstaller.
** master https://gerrit.wikimedia.org/r/419130
[ ] Backport to all MediaWiki branches we support
[ ] Clean CI config ( 50_mw_ext_loader.php and extensions_load.txt generation )
Note: in case an extension lacks `extension.json` or the expected PHP entry point, LocalSettingsGenerator::generateExtEnableLine forges a require_once with the extension name nonetheless even if the file does not exist. That will later causes an error when failing to require the file. That covers the abort / exit(1); we have in 50_mw_ext_loader.php