What's Changed
- Update libraries compatibility with latest PHP versions by @andrepimpao in #61
- Remove parameters validation by @andrepimpao in #62
- New Weather Overview endpoint by @andrepimpao in #63
- New AI Assistant resource by @andrepimpao in #64
Breaking Changes
Parameter validation for endpoints (like validating the given latitude/longitude before making the request) was removed. This is only relevant if you were catching validation exceptions.
Now the validation is performed by the native API itself and can be "catched" in the already existing API Error Exceptions.
As an alternative, and with its advantages (like adding your own error messages), you can use the programmatordev/fluent-validator (or any other validation library) to do the same:
try {
Validator::range(-90, 90)->assert($latitude);
Validator::range(-180, 180)->assert($longitude);
$weather = $api->weather()->getCurrent($latitude, $longitude);
}
catch (ValidationFailedException $e) {
// handle validation errors
}
catch (ApiErrorException $e) {
// handle API errors
}Full Changelog: v2.0.0...v3.0.0