Are consumedServices required?


I just read the docs and one thing is not clear to me: when I add dependencies to ‘consumedServices’ in my package, will other users need to have these installed? or are they installed automatically?

I ask because I want to have an optional dependency, like ‘if this plugin is also installed, use it - if not, then don’t’.


I believe service dependencies are completely optional, as you describe. If a service isn’t provided, your package won’t consume it.


That’s exactly what you will get :smile:. Services are different than dependencies in that they won’t force any installation, IIRC there was a discussion, maybe even a PR I couldn’t find it yet, about a package set mechanism that would fill the dependencies install part (and much more).

Another useful thing with services is that the user can choose the provider implementation when several packages implements the same service.



Thanks for your answer :slight_smile: