We have in our composer.json a depency with elasticsearch. Even If we don't want using elastic, the package will be installed via composer.
The idea should be install only elastic lib if you use this adapter for your context storage.
(see example with this project : https://github.com/Superbalist/php-pubsub)