Use the following guide to assist in the upgrade process of the easypost-php
library between major versions.
- Default Timeouts for HTTP Requests
- Removal of
all
method from theOrder
,CustomsInfo
, andCustomsItem
Objects - Removal of
get_rates
Shipment Method
TODO
- Default Timeouts for HTTP Requests
- Removal of
all
method from theOrder
,CustomsInfo
, andCustomsItem
Objects - Removal of
get_rates
Shipment Method
Likelihood of Impact: High
PHP 7.3 Required
easypost-php now requires PHP 7.3 or greater.
Dependencies
All dependencies had minor version bumps.
Likelihood of Impact: Medium
Default timeouts for all HTTP requests are now set to 30 seconds for connection and 60 seconds for requests. If you require longer timeouts, you can set them by overriding the defaults:
// Timeouts are in milliseconds
EasyPost::setConnectTimeout(30000);
EasyPost::setResponseTimeout(60000);
Likelihood of Impact: Medium
The /all
endpoint for the Order, CustomsInfo, and CustomsItem objects are not paginated and have therefore been removed from the library.
Likelihood of Impact: Medium
The HTTP method used for the get_rates
endpoint at the API level has changed from POST
to GET
and will only retrieve rates for a shipment instead of regenerating them. A new /rerate
endpoint has been introduced to replace this functionality; In this library, you can now call the Shipment::regenerate_rates
method to regenerate rates. Due to the logic change, the get_rates
method has been removed since a Shipment inherently already has rates associated.
Likelihood of Impact: Low
There is no /all
endpoint for the Parcel object. This function was removed as it was unusable.
Likelihood of Impact: High
All POST
and PUT
request bodies are now JSON encoded instead of form-encoded. You may see subtle inconsistencies to how certain data types were previously sent to the API. We have taken steps to mitigate and test against these edge cases.
Likelihood of Impact: Low
Dependencies
All dependencies had their patch versions bumped.