nexmo-php 2.0.0

[2.0.0] - 2019-09-10

This release contains a few under-the-hood changes. The largest is the bump to PHP 7.1, which may affect some customers. If you are on an older version of PHP, you will be limited to SDK v1.8.1 or lower.

We have also renamed this package into nexmo/client-core and added a new wrapper package to replace nexmo/client. For most customers this process should be seamless, and composer should automatically handle the change. This change is made to remove a collision between our package and others that may supply Guzzle themselves.

If you use the SDK to search for numbers, please be advised that we did change the response for when no numbers are found. It will now return an empty array instead of throwing an exception. Other searches are not affected and will continue to throw their original exceptions.

Exceptions will now support an additional getEntity() method that returns additional information about what happened. In many cases this is the response from the server, to make it easier to understand the API error message. Exceptions continue to return error codes and messages like before, but the getEntity() method can be used for better context during error handling.

Please check the rest of the changelog for a full list of changes.

Added

  • Now grab the version of the SDK from composer.json for the User Agent
  • Exceptions now support a getEntity() method to get more information during errors

Changed

  • Changed minimum version to PHP 7.1
  • Renamed package to nexmo/client-core
  • Bumped to PHPUnit 7.4
  • Now return an empty array when searching for numbers and none are found. This no longer throws an exception.

Deprecated

  • No new deprecations were added

Fixed

  • Improved error handling for Number Insights

Removed

  • Removed direct Guzzle dependency, and moved it to nexmo/client

Security

  • No new security fixes were added