guzzle-log-middleware icon indicating copy to clipboard operation
guzzle-log-middleware copied to clipboard

guzzle_logger v2.2.0 incompatible with Guzzle >= 7.7.0

Open mwolff-fn opened this issue 1 year ago • 4 comments

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).

mwolff-fn avatar Jun 16 '23 09:06 mwolff-fn

Alternatively make this library depend on guzzlehttp/promises ^1.5 explicitly, that will prevent installing the newer library with the removed functions.

SvenRtbg avatar Jun 16 '23 15:06 SvenRtbg

I created a PR to fix the issue: https://github.com/gmponos/guzzle-log-middleware/pull/50

mwolff-fn avatar Aug 02 '23 10:08 mwolff-fn

We need this PR to be merged https://github.com/gmponos/guzzle-log-middleware/pull/50

EmanSalla avatar Aug 17 '23 08:08 EmanSalla

@gmponos we still waiting for this to be merged https://github.com/gmponos/guzzle-log-middleware/pull/52

ossycodes avatar Aug 21 '23 10:08 ossycodes