shippo-php-client
shippo-php-client copied to clipboard
Incorrect API response
This can be easily replicated in by running the following test and examining the output in the CurlClient
:
https://github.com/goshippo/shippo-php-client/blob/e4b577a0f45675db5df54e14877a2a9f463dfcad/test/ParcelTest.php#L48-L52
The expected output format according to the documentation is:
{
"next": null,
"previous": null,
"results": [
{
"object_state": ...
},
]
}
When the page size is 1
the json fragment is:
{
"next": null,
"previous": null,
"results": {
"object_state": ...
}
This causes the test to fail in PHP7.4 because the resulting object is not Countable
.