Description
The current documentation says:
Use for Reusable Bundles
Rather than code against specific HTTP clients, you want to use the HttplugClient
interface. To avoid building your own infrastructure to define services for the client, simplyrequire: php-http/httplug-bundle
in your bundlescomposer.json
. You SHOULD provide configuration for each of your services that needs an HTTP client to specify the service to use, defaulting tohttplug.client
. This way, the default case needs no additional configuration for your users.
The only steps they need isrequire
one of the adapter implementations in their projectscomposer.json
and instantiating the HttplugBundle in their kernel.
Is this really the best practice? If a third party bundle define httplug.client
in their services.yml it will be very difficult to change the client used. I've done like this time to time but it does not feel 100% perfect. It is a lot to write for the third party bundle but it works perfectly.
Can I get some feedback? Does it exists any other options?