When the autoloader of Wikibase is loaded the Mediawiki installer fails. I hit this when trying to use the composer merge plugin in our CI instead of cloning mediawiki/vendor and running composer once for each extension that needs it.
It seems Wikibase is automatically enabled when it is not explicitly disabled, but it can't cope with certain settings not being there.
Example from: https://integration.wikimedia.org/ci/job/mwext-WikidataQuality-repo-tests-mysql-zend/46/consoleFull
MWException from line 82 of /mnt/jenkins-workspace/workspace/mwext-WikidataQuality-repo-tests-mysql-zend/src/extensions/Wikibase/repo/Wikibase.hooks.php: Wikibase: Incomplete configuration: $wgWBRepoSettings["entityNamespaces"] has to be set to an array mapping content model IDs to namespace IDs. See ExampleSettings.php for details and examples.
Backtrace:
#0 [internal function]: Wikibase\RepoHooks::onSetupAfterCache()
#1 /mnt/jenkins-workspace/workspace/mwext-WikidataQuality-repo-tests-mysql-zend/src/includes/Hooks.php(209): call_user_func_array(string, array)
#2 /mnt/jenkins-workspace/workspace/mwext-WikidataQuality-repo-tests-mysql-zend/src/includes/Setup.php(604): Hooks::run(string)
#3 /mnt/jenkins-workspace/workspace/mwext-WikidataQuality-repo-tests-mysql-zend/src/maintenance/doMaintenance.php(97): require_once(string)
#4 /mnt/jenkins-workspace/workspace/mwext-WikidataQuality-repo-tests-mysql-zend/src/maintenance/install.php(158): require_once(string)
#5 {main}