ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
137 stars 85 forks source link

Replace Guzzle with PSR-18 client in OpenAPI Generator for PHP #309

Open taisph opened 8 months ago

taisph commented 8 months ago

Preflight checklist

Ory Network Project

No response

Describe your problem

Forcing the use of Guzzle can make integration in third party applications a bit more complex than it needs to be. OpenAPI Generator for PHP supports using PSR-18 compatible clients instead of Guzzle, by specifying library: psr-18 in a reasonably new version of the generator. Since Guzzle is PSR-18 compatible, existing users should be able to keep using Guzzle if they choose to.

Describe your ideal solution

Update the OpenAPI Generator for PHP, add library: psr-18 to the generator config and regenerate PHP libraries. Hopefully nothing breaks but would probably require a major semver bump.

Workarounds or alternatives

None feasible. It is quite complicated to manually build and use the PHP libraries.

Version

ory/client v1.4.0

Additional Context

No response

aeneasr commented 3 weeks ago

This makes sense to me!

aeneasr commented 3 weeks ago

Unfortunately, PSR-18 is still in beta support which probably means that it's broken for template generation. I think we'll wait until it is officially released!