Repository navigation
v6.0.0-rc1
Pre-release
Pre-release
·
287 commits
to master
since this release
- PHP 7.3 is no longer supported
- Added a new
EasyPostClientobject which encapsulates the API key. All functions are called against this client allowing for thread-safety (eg:$client->shipment->create())- All instance methods and the ability to have objects update in-place has been removed due to this rearchitecture. When updating objects or performing actions on them (eg: creating a label/scanform), you will need to assign the return value to a variable and use that moving forward instead of relying on the object getting updated without capturing the new return value
->save()instance methods are nowupdate()static methods- Functions no longer accept an API key as an optional parameter
- EasyPost objects no longer contain the logic associated with them; instead, we have
Servicesfor each EasyPost object. All the services are properties of anEasyPostClient. You can then call functions on a Service.
- All function and parameter names are now camelCase. Previously we used a mix of camel and snake cases
- Improves error exception handling (closes #7)
- Introduced ~2 dozen new exception types that extend from either
ApiExceptionorEasyPostException - ApiExceptions will behave like the previous EasyPostException class did. They will include a
message,errors,code,httpStatusandhttpBody. This class extends the more generic EasyPostException which only contains a message, used for exceptions thrown directly from this library - The
ecodeproperty of anApiExceptionis now justcode
- Introduced ~2 dozen new exception types that extend from either
- Functions that previously returned
truenow return void as there is no response body from the API (eg:fundWallet,deletePaymentMethod,updateEmail,createList) - Adopts
Guzzleas the HTTP client for this library. This should provide a much more consistent experience, better encoding, and faster request times in some cases - The results of calling
allApiKeysis no longer double wrapped with the mode of the API key (these are still accessible inside of each object) Requestorhas moved toHttp, constants fromEasyPostnow live inConstants,Errormoved toException- Occurances of
smartrateare nowsmartRateandSmartrateare nowSmartRateto match the documentation and API expectations Referralis nowReferralCustomerto better match documentation and API expectationvalidateWebhook,getLowestSmartRate, andreceiveEventare now underEasyPost\Util\Utilas they do not make any API calls and do not need the associated client object- The
receivefunction previously in the namespace ofEventis now calledreceiveEventsince it has been relocated to the generic Util namespace - Internal, library only utilities have been moved to
EasyPost\Util\InternalUtil
- The
- The beta
EndShipperclass has been removed, please use the generally availableEndShipperclass - Various properties and functions that were previously intended for private/protected use but were public have been corrected
- All phpdoc type hints, descriptions, return values, and throws references were corrected or updated
- All dependencies were bumped
- Various other bug fixes and improvements were made along with addressing deprecation warnings