Steps to replicate the issue (include links if applicable):
- Install a fresh version of Mediawiki with Elastica and CirrusSearch extensions
- Run composer install --no-dev from the project root
- Run maintenance jobs such as w/maintenance/run update --wiki $wid --quick --doshared
What happens?:
You will get an error Class Elastica/Client not found.
What should have happened instead?:
composer install --no-dev should have taken care of installing all dependencies for all extensions.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MW 1.43
Other information (browser name/version, screenshots, etc.):
I believe this is caused by the fact that the CirrusSearch extension does not declare the dependency on ruflin/elastica in its composer.json, which is where the class Elastica/Client is coming from.
The Elastica extension does declare this dependency in its composer.json. I believe each extension should clearly declare / require its dependencies in composer.json, so there should be an entry for "ruflin/elastica": "7.3.1" in the CirrusSearch composer.json .
Other users have encountered the same problem in previous versions of MW, see https://www.mediawiki.org/wiki/Topic:V5ronoam552ge9f0 where the MW version was 1.33.
I am about to do another fresh install of MW 1.44 so I will test that this is what is causing this problem.