Skip to content

Documentation: Use for Reusable Bundles #58

Closed
@Nyholm

Description

@Nyholm

The current documentation says:

Use for Reusable Bundles
Rather than code against specific HTTP clients, you want to use the Httplug Client interface. To avoid building your own infrastructure to define services for the client, simply require: php-http/httplug-bundle in your bundles composer.json. You SHOULD provide configuration for each of your services that needs an HTTP client to specify the service to use, defaulting to httplug.client. This way, the default case needs no additional configuration for your users.
The only steps they need is require one of the adapter implementations in their projects composer.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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions