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

PSR-18 compatibility #292

Open
faizanakram99 opened this issue Jan 10, 2024 · 1 comment
Open

PSR-18 compatibility #292

faizanakram99 opened this issue Jan 10, 2024 · 1 comment

Comments

@faizanakram99
Copy link

This package has a hard dependency upon guzzle, it is generally considered a good practice for an SDK to not depend upon a specific implementation.

We've PSR-18 for exact this use-case. Luckily, Guzzle already implements it (https://packagist.org/providers/psr/http-client-implementation). It would allow consumers to use http client of their choice. Optionally, this package can depend upon php-http/discovery instead which provides factories and discoveries for various PSRs.

The main change would be to depend upon PSR-18 ClientInterface instead of Guzzle's ClientInterface. I see that there are some guzzle middlewares shipped for convenience about rate limiting and such, they can be left as is with a note (if you're using guzzle you can use these middlewares bla bla).

@faizanakram99 faizanakram99 changed the title PSR 18 compatibility PSR-18 compatibility Jan 10, 2024
@faizanakram99
Copy link
Author

looks like OpenApiTools already supports PSR-18 OpenAPITools/openapi-generator#16368

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

1 participant