Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why require guzzlehttp/guzzle while elastic/transport is client agnostic? #1337

Closed
ruudk opened this issue Jul 6, 2023 · 3 comments
Closed

Comments

@ruudk
Copy link

ruudk commented Jul 6, 2023

Summary of problem or feature request

Maybe I'm missing something, but why does this package depend on guzzlehttp/guzzle while elastic/transport can support any PSR client?

@ruudk ruudk changed the title Why require guzzlehttp/guzzle while elastic/transport is client agnostic Why require guzzlehttp/guzzle while elastic/transport is client agnostic? Jul 6, 2023
@ezimuel
Copy link
Contributor

ezimuel commented Jul 17, 2023

We decided to simplifying the usage of this library offering a default client, and we choose Guzzle. If you want, you can change the HTTP client using the setHttpClient() function of the client builder, here the documentation.

@ruudk
Copy link
Author

ruudk commented Jul 17, 2023

I understand, but the fact that you require it as a dependency doesn't make sense to me. I think that you want to improve the Developer Experience to automatically require it, but people that pull in this dependency know how to also require a suggested HTTP client. It should be in suggests so that people can freely choose without pulling in Guzzle. I hope you can reconsider it ☺️

@ezimuel
Copy link
Contributor

ezimuel commented Aug 2, 2023

@ruudk thanks for your feedback, I agree from a technical point of view but from a product perspective this simplify the process. The majority of the users use guzzle. The only disadvantage is having guzzle installed even if you don't use it, and this is a rare case. That said, we can reconsider it in the next major release if the user scenarios and requirements will change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants