consilience / openapi-generator-psr18

Templates to generate a PSR-18/PSR-17/PSR-7 client package for PHP
Apache License 2.0
2 stars 0 forks source link

Handle multiple client types (PSR-18 + Guzzle) #8

Open judgej opened 5 years ago

judgej commented 5 years ago

The problem is the async requests that return promises. There is no PSR for this at the moment, and every client handles promises differently. We should be able to supply a PSR-18 client, a Guzzle client, both, or a custom client that handles both interfaces. This package can then choose the client it needs (the sync or async client) at request time.

This does seem really messy, but it may take us forward until an async PSR is developed (though no hints of that yet).