ackintosh / ganesha

:elephant: A Circuit Breaker pattern implementation for PHP applications.
https://ackintosh.github.io/ganesha/
MIT License
585 stars 42 forks source link

Call to undefined function GuzzleHttp\Promise\promise_for() #108

Closed jmdelehaye closed 1 year ago

jmdelehaye commented 1 year ago

Version : ackintosh/ganesha 2.0.2 Middleware : Guzzle

After upgrading guzzlehttp/promises from 1.5.3 to 2.0.1 on my project, I get a : Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\Promise\promise_for() in /home/web/sfc/vendor/ackintosh/ganesha/src/Ganesha/GuzzleMiddleware.php:52

And indeed, GuzzleMiddleware needs guzzlehttp/promises functions that were removed in v2.0.

So guzzlehttp/promises dependency could probably be improved:

jmdelehaye commented 1 year ago

Sorry, I just see https://github.com/ackintosh/ganesha/blob/master/src/Ganesha/GuzzleMiddleware.php#L52

So it's fixed in latest versions of ackintosh/ganesha.