You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-2
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,18 @@
1
1
# CHANGELOG
2
2
3
-
## Next Major Release
3
+
## v7.0.0 (2023-12-01)
4
+
5
+
Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md).
4
6
5
7
- Drops support for PHP 7.4
6
8
- Adds support for PHP 8.3
7
9
- Persists the HTTP client inside of the `EasyPostClient` via the `httpClient` property to reduce memory consumption on consecutive requests
8
-
- Adds type hints for parameters and return values throughout the library, corrects docstring hints where necessary
10
+
- Adds type declarations for parameters and return values throughout the library, corrects docstrings to match
9
11
- Removed `withCarbonOffset` parameter from `create`, `buy`, and `regenerateRates` functions of the Shipment service as EasyPost now offers Carbon Neutral shipments by default for free
10
12
- Fixes a bug where the original filtering criteria of `all` calls wasn't passed along to `getNextPage` calls. Now, these are persisted via a `_params` key on response objects locally
11
13
- Removes the undocumented `createAndBuy` function from the `Batch` service. The proper usage is to create a batch first and buy it separately
12
14
- Renames `primaryOrSecondary` to `priority` to match the API name for the parameter
15
+
- Corrects the order of the `userId` and `email` parameters in the `updateEmail` function of the ReferralCustomer service to match the rest of the library where IDs are always the first parameter
13
16
- Fix various bugs throughout the library
14
17
15
18
## v6.9.1 (2023-11-20)
@@ -74,6 +77,8 @@
74
77
75
78
## v6.0.0 (2023-01-05)
76
79
80
+
Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md).
81
+
77
82
- Release final version of v6 that contains all the changes in the `v6.0.0-rc1` below
-[createAndBuy Batch Function Removed](#70-createandbuy-batch-function-removed)
21
+
-[updateEmail Parameter Order Corrected](#70-updateemail-parameter-order-corrected)
22
+
23
+
### 7.0 Drop Support for PHP 7.4
24
+
25
+
With the introduction of PHP 8.3, support for PHP 7.4 has been dropped. This library now requires PHP 8.0 or greater.
26
+
27
+
### 7.0 Type Declarations Added
28
+
29
+
The library previously had type hints available via docstrings. With PHP 8.0+ support, the library now has type declarations for every function parameter and return value. You will want to double check that the types passed to each function match the expectations to avoid `TypeError`s being thrown at runtime. Docstrings have been updated to match and assist IDEs in this process. You may notice some changes in what was expected before and the corrected types now. We've made every attempt to retain where possible the previous values or loose possible options to allow for the maximum backwards compatibility.
30
+
31
+
### 7.0 Carbon Offset Removed
32
+
33
+
EasyPost now offers Carbon Neutral shipments by default for free! Because of this, there is no longer a need to specify if you want to offset the carbon footprint of a shipment. The `withCarbonOffset` parameter of the `create`, `buy`, and `regenerateRates` shipment functions have been removed as a result. This is a high-impact change for those using `EndShippers` as the function interfaces have changed. You will need to inspect the callsites to create and buy shipments to ensure that the EndShipper parameter is being passed in the correct place now that the `withCarbonOffset` parameter has been removed.
34
+
35
+
### 7.0 createAndBuy Batch Function Removed
36
+
37
+
The `create_and_buy` Batch endpoint has been deprecated and has thus been removed from the library. The proper flow is to create a batch first and buy it separately with two API calls.
38
+
39
+
### 7.0 updateEmail Parameter Order Corrected
40
+
41
+
The `updateEmail` function of the `ReferralCustomer` service mistakenly had the `email` parameter first when it should have had `userId` first. This change has been made to ensure that every function that accepts an ID always has the ID come first. If you use this function, you will simply need to swap the order of the two parameters.
42
+
9
43
## Upgrading from 5.x to 6.0
10
44
45
+
**NOTICE:** v6 is deprecated.
46
+
11
47
### 6.0 High Impact Changes
12
48
13
49
-[Drop Support for PHP 7.3](#60-drop-support-for-php-73)
@@ -20,11 +56,11 @@ Use the following guide to assist in the upgrade process of the `easypost-php` l
20
56
-[Changed Function Return Types](#60-changed-function-return-types)
21
57
-[Moved Functions](#60-moved-functions)
22
58
23
-
## 6.0 Drop Support for PHP 7.3
59
+
###6.0 Drop Support for PHP 7.3
24
60
25
61
With the introduction of PHP 8.2, support for PHP 7.3 has been dropped. This library now requires PHP 7.4 or greater.
26
62
27
-
## 6.0 New EasyPostClient Object
63
+
###6.0 New EasyPostClient Object
28
64
29
65
This library is now thread-safe with the introduction of a new `EasyPostClient` object. Instead of defining a global API key that all requests use, you create an `EasyPostClient` object and pass your API key to it. You then call your desired functions against a "service" which coincide with EasyPost objects:
30
66
@@ -44,15 +80,15 @@ Previously used `->save()` instance methods are now static `update()` functions
44
80
45
81
Functions no longer accept an API key as an optional parameter. If you need per-function API key changes, create a new Client object and call the function on the new client that uses the API key you need.
46
82
47
-
## 6.0 Corrected Naming Conventions
83
+
###6.0 Corrected Naming Conventions
48
84
49
85
We previously had a mix of camelCase and snake_case function and parameter names in this library. These have all been corrected to only use `camelCase`. Things like `lowestRate`, `allApiKeys`, etc have changed.
50
86
51
87
The `Referral` class is now called `ReferralCustomer` to match our documentation and API.
52
88
53
89
Occurances of `smartrate` are now `smartRate` and `Smartrate` are now `SmartRate` to match the documentation and API expectations.
54
90
55
-
## 6.0 Improved Exceptions
91
+
###6.0 Improved Exceptions
56
92
57
93
Introduced ~2 dozen new exception types that extend from either `ApiException` or `EasyPostException`.
58
94
@@ -89,13 +125,13 @@ ApiExceptions will behave like the previous EasyPostException class did. They wi
89
125
90
126
The `ecode` property of an `ApiException` is now just `code`
91
127
92
-
## 6.0 Changed Function Return Types
128
+
###6.0 Changed Function Return Types
93
129
94
130
Functions that previously returned `true` now return void as there is no response body from the API (eg: `fundWallet`, `deletePaymentMethod`, `updateEmail`, `createList`)
95
131
96
132
The results of calling `allApiKeys` is no longer double wrapped with the mode of the API key (these are still accessible inside of each object)
97
133
98
-
## 6.0 Moved Functions
134
+
###6.0 Moved Functions
99
135
100
136
The `validateWebhook`, `getLowestSmartRate`, and `receive` functions are now under `EasyPost\Util\Util` as they do not make any API calls and do not need the associated client object.
101
137
@@ -121,7 +157,7 @@ The `receive` function previously in the namespace of `Event` is now called `rec
121
157
122
158
-[Removal of all Method from the Parcel Object](#50-removal-of-all-method-from-the-parcel-object)
123
159
124
-
## 5.0 Updating Dependencies
160
+
###5.0 Updating Dependencies
125
161
126
162
Likelihood of Impact: High
127
163
@@ -133,7 +169,7 @@ easypost-php now requires PHP 7.3 or greater.
## 5.0 Removal of all() Method from the Order, CustomsInfo, and CustomsItem Objects
184
+
###5.0 Removal of all() Method from the Order, CustomsInfo, and CustomsItem Objects
149
185
150
186
Likelihood of Impact: Medium
151
187
152
188
The `/all` endpoint for the Order, CustomsInfo, and CustomsItem objects are not paginated and have therefore been removed from the library.
153
189
154
-
## 5.0 Removal of get_rates() Shipment Method
190
+
###5.0 Removal of get_rates() Shipment Method
155
191
156
192
Likelihood of Impact: Medium
157
193
158
194
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.
159
195
160
-
## 5.0 Removal of all() Method from the Parcel Object
196
+
###5.0 Removal of all() Method from the Parcel Object
161
197
162
198
Likelihood of Impact: Low
163
199
@@ -175,13 +211,13 @@ There is no `/all` endpoint for the Parcel object. This function was removed as
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.
0 commit comments