guzzle-log-middleware
guzzle-log-middleware copied to clipboard
guzzle_logger v2.2.0 incompatible with Guzzle >= 7.7.0
Using Guzzle 7.7.0 and gmponos/guzzle_logger 2.2.0, we recently ran into this error:
Error: Call to undefined function GuzzleHttp\Promise\rejection_for()
/project/vendor/gmponos/guzzle_logger/src/LogMiddleware.php:115
/project/vendor/guzzlehttp/promises/src/Promise.php:209
/project/vendor/guzzlehttp/promises/src/Promise.php:158
/project/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/project/vendor/guzzlehttp/promises/src/Promise.php:251
/project/vendor/guzzlehttp/promises/src/Promise.php:227
/project/vendor/guzzlehttp/promises/src/Promise.php:272
/project/vendor/guzzlehttp/promises/src/Promise.php:229
/project/vendor/guzzlehttp/promises/src/Promise.php:69
/project/vendor/guzzlehttp/guzzle/src/Client.php:189
/project/vendor/guzzlehttp/guzzle/src/ClientTrait.php:44
I suspect it might have to do with Guzzle 7.7.0 now supporting guzzlehttp/promises v2, which removes all functions in favour of static methods (https://github.com/guzzle/promises/blob/2.0.0/CHANGELOG.md).
Alternatively make this library depend on guzzlehttp/promises ^1.5
explicitly, that will prevent installing the newer library with the removed functions.
I created a PR to fix the issue: https://github.com/gmponos/guzzle-log-middleware/pull/50
We need this PR to be merged https://github.com/gmponos/guzzle-log-middleware/pull/50
@gmponos we still waiting for this to be merged https://github.com/gmponos/guzzle-log-middleware/pull/52