Closed lambjs closed 3 months ago
@lambjs did you try this on a recent version with a supported PHP version?
This sounds like something that is a problem in guzzle itself and not something easily fixable on our end. I'm willing to look at a pull request if you are up for it?
I think the issue is in services_v8.json. If I understand the docs correctly for the JSON service definitions, then anywhere you've defined the parameter "id", you'll want to change it's type to be ["integer", "string"] so that it accepts either format. You'll also probably want to use the "filters" option to specify a custom callback that applies an is_numeric check on the value.
I don't have time to do the pull request this week. I suspect that this is a major issue that will affect multiple users of your library in the coming weeks.
Thanks for that extra information, i'll see what i can do the coming days.
Indeed sounds like an issue others will run into soon.
As this didn't get any traction, it seems others are not affected. Closing as not planned
Example:
Gets me this ugly looking exception on Guzzl 1.2.1:
Note that $time_entry['id'] is stored as a string since its integer value exceeds the maximum 2147483647. It seems that Toggl's ID's have passed the INT threshold.
Are you able to push a change so that internally Guzzle validates this as a numeric string?
Also really hoping you'll apply this to Guzzl 1.2 and 1.3 as I'm still chugging along on PHP 5.6 on this old utility box where this code is deployed (I know... I know...)