Repository navigation
Conversation
Utils::jsonDecode is deprecated and will be removed in Guzzle 8,
Drop support for < PHP 8.4 Drop support for PHP <8.4 Support guzzle 8 Bump
5052f73 to
77472c3
Compare
acoulton
left a comment
There was a problem hiding this comment.
Thanks - couple of small comments
| try { | ||
| return Utils::jsonDecode((string) $response->getBody(), TRUE); | ||
| } catch (InvalidArgumentException $e) { | ||
| $data = json_decode((string) $response->getBody(), TRUE, 512, JSON_THROW_ON_ERROR); |
There was a problem hiding this comment.
I'd suggest not specifying the depth: param as it's the default, and just specifying flags: JSON_THROW_ON_ERROR?
There was a problem hiding this comment.
Yeah, I thought the same, I'll do that
|
|
||
| try { | ||
| $decoded = Utils::jsonDecode($e->getResponse()->getBody(), TRUE); | ||
| $decoded = json_decode((string) $e->getResponse()->getBody(), TRUE, 512, JSON_THROW_ON_ERROR); |
There was a problem hiding this comment.
same comment on json_decode args here
| "require": { | ||
| "guzzlehttp/guzzle": "^7.9.2", | ||
| "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" | ||
| "guzzlehttp/guzzle": "^7.9.2 || ^8.3", |
There was a problem hiding this comment.
CI looks like the lowest job is still installing 8.3 - I think possibly because of the dev dependency on guzzlehttp/promises >= 3.1.0?
If we're still going to advertise support for 7.x I think we need a CI job that proves that.
I think loosening the promises dependency should be enough to allow the --prefer-lowest to install 7.x.
There was a problem hiding this comment.
Ahh ok, I'll need to take a closer look, I think we just drop support for guzzle 7. Loosening the promises dependency then fails on 8.6 lowest because of the Is class name issue.
There was a problem hiding this comment.
Might just need to check the ecosystem - there may be other packages we/people use that are tied to guzzle 8.
If the issue is the 8.6 lowest build, I'd maybe look at the CI matrix/composer install step so that the 8.6 lowest build runs composer update --with=guzzlehttp/promises:^3 or whatever min constraint forces that to an 8.6 compatible version.
No description provided.