Closed
Description
Symfony version(s) affected: 4.x, 5.x
Description
RejectedPromise
returned here is Http\Promise\RejectedPromise
, but not the full implementation like Symfony\Component\HttpClient\Response\HttplugPromise
(as in docblock @return
)This can cause problem. For example, promises returned by then functions will be treated as plain value.
How Guzzle promise settle promises:
https://github.com/guzzle/promises/blob/bbf3b200bc83c1e9298580a9f99b9be248543467/src/RejectedPromise.php#L40
https://github.com/guzzle/promises/blob/bbf3b200bc83c1e9298580a9f99b9be248543467/src/Promise.php#L108
How to reproduce
https://github.com/brentybh/symfony-37488
Sorry, it's not finished yet.
Because I have to bring in a retry middleware.
The Httplug simple promise CAN cover most simple use cases. But the retry middleware implementation is different...
Possible Solution
emm.. Maybe it's not strictly an issue of Symfony but a problem of Httplug....
Additional context