|
7 | 7 | ### Changed
|
8 | 8 |
|
9 | 9 | * Updated documentation
|
| 10 | +* Updated dependencies |
10 | 11 |
|
11 |
| -**Full Changelog**: https://github.com/Thavarshan/fetch-php/compare/3.2.0...3.2.1 |
| 12 | +**Full Changelog**: <https://github.com/Thavarshan/fetch-php/compare/3.2.0...3.2.1> |
12 | 13 |
|
13 | 14 | ## [v3.2.0](https://github.com/Thavarshan/fetch-php/compare/v3.1.1...v3.2.0) - 2025-05-16
|
14 | 15 |
|
|
28 | 29 |
|
29 | 30 | * Improved back-off delay calculations in retry tests to ensure correct timing.
|
30 | 31 |
|
31 |
| -**Full Changelog**: https://github.com/Thavarshan/fetch-php/compare/3.1.1...3.2.0 |
| 32 | +**Full Changelog**: <https://github.com/Thavarshan/fetch-php/compare/3.1.1...3.2.0> |
32 | 33 |
|
33 | 34 | ## [v3.1.1](https://github.com/Thavarshan/fetch-php/compare/v3.1.0...v3.1.1) - 2025-05-16
|
34 | 35 |
|
35 | 36 | ### Added
|
36 | 37 |
|
37 |
| -- Implemented the missing `finalizeRequest()` method in the `PerformsHttpRequests` trait. This method centralizes request finalization logic, enabling internal shortcut methods like `get()`, `post()`, etc., to function correctly. |
| 38 | +* Implemented the missing `finalizeRequest()` method in the `PerformsHttpRequests` trait. This method centralizes request finalization logic, enabling internal shortcut methods like `get()`, `post()`, etc., to function correctly. |
38 | 39 |
|
39 | 40 | ### Changed
|
40 | 41 |
|
41 |
| -- Internal shortcut HTTP methods (`get()`, `post()`, `put()`, etc.) in `PerformsHttpRequests` now route through the newly added `finalizeRequest()` method for consistent request handling. |
| 42 | +* Internal shortcut HTTP methods (`get()`, `post()`, `put()`, etc.) in `PerformsHttpRequests` now route through the newly added `finalizeRequest()` method for consistent request handling. |
42 | 43 |
|
43 | 44 | ### Fixed
|
44 | 45 |
|
45 |
| -- Fixed a fatal error caused by calling an undefined `finalizeRequest()` method in `ClientHandler`. The missing method has now been properly defined and implemented. |
| 46 | +* Fixed a fatal error caused by calling an undefined `finalizeRequest()` method in `ClientHandler`. The missing method has now been properly defined and implemented. |
46 | 47 |
|
47 | 48 | ## [v3.1.0](https://github.com/Thavarshan/fetch-php/compare/v3.0.0...v3.1.0) - 2025-05-10
|
48 | 49 |
|
49 | 50 | ### Added
|
50 | 51 |
|
51 | 52 | * **PSR-18 Client**: `Fetch\Http\Client` now implements `Psr\Http\Client\ClientInterface` for drop-in interoperability.
|
52 |
| - |
| 53 | + |
53 | 54 | * **Fluent Request Builder**: Chainable helpers on `ClientHandler` for headers, query params, JSON/form/multipart bodies, bearer token, basic auth, timeouts, redirects, cookies, proxy, certificates.
|
54 |
| - |
| 55 | + |
55 | 56 | * **Async/Promise Support**: Built-in ReactPHP-style promises (`async()`, `await()`, `all()`, `race()`, `any()`, `sequence()`), with `->async()` toggle and `wrapAsync()`/`awaitPromise()` helpers.
|
56 |
| - |
| 57 | + |
57 | 58 | * **Automatic Retries**: Configurable max retries, retry delay, exponential backoff with jitter, and retry-on-status (408, 429, 5xx) or exceptions (`ConnectException`).
|
58 |
| - |
| 59 | + |
59 | 60 | * **PSR-3 Logging**: Optional `LoggerInterface` injection on `Client` and `ClientHandler` with info/debug/error logs and sensitive-data masking for retries, requests, and responses.
|
60 |
| - |
| 61 | + |
61 | 62 | * **Immutable PSR-7 Extensions**:
|
62 |
| - |
| 63 | + |
63 | 64 | * `Fetch\Http\Request` extends Guzzle’s PSR-7 `Request` with immutability traits and JSON/form/multipart constructors.
|
64 | 65 | * `Fetch\Http\Response` extends Guzzle’s PSR-7 `Response` with buffered body, array-access to JSON payloads, and helpers: `->json()`, `->text()`, `->xml()`, `->blob()`, `->arrayBuffer()`, status inspectors, etc.
|
65 |
| - |
| 66 | + |
66 | 67 | * **Enums for Safety**: `Fetch\Enum\Method`, `ContentType`, and `Status` enums for validating methods, content types, and status codes.
|
67 |
| - |
| 68 | + |
68 | 69 | * **Test Helpers**: `ClientHandler::createMockResponse()` and `createJsonResponse()` to easily stub HTTP responses in unit tests.
|
69 |
| - |
70 | 70 |
|
71 | 71 | ### Changed
|
72 | 72 |
|
|
80 | 80 |
|
81 | 81 | * None
|
82 | 82 |
|
83 |
| - |
84 | 83 | ---
|
85 | 84 |
|
86 | 85 | ## [v3.0.0](https://github.com/Thavarshan/fetch-php/compare/v2.0.6...v3.0.0) - 2025-05-04
|
87 | 86 |
|
88 | 87 | ### Added
|
89 | 88 |
|
90 | 89 | * **True Asynchronous Support**: Completely reimplemented asynchronous functionality using Matrix’s PHP Fiber-based library.
|
91 |
| - |
| 90 | + |
92 | 91 | * **JavaScript-like Syntax**: Added support for JavaScript-like async/await patterns with `async()` and `await()` functions.
|
93 |
| - |
| 92 | + |
94 | 93 | * **Promise-based API**: Introduced a clean Promise interface with `then()`, `catch()`, and `finally()` methods.
|
95 |
| - |
| 94 | + |
96 | 95 | * **Concurrent Request Helpers**: Added support for managing multiple concurrent requests with `all()`, `race()`, and `any()` functions.
|
97 |
| - |
| 96 | + |
98 | 97 | * **Task Lifecycle Management**: Implemented proper task lifecycle control (start, pause, resume, cancel, retry).
|
99 |
| - |
| 98 | + |
100 | 99 | * **Enhanced Error Handling**: Added improved error handling with customizable error handlers.
|
101 |
| - |
| 100 | + |
102 | 101 | * **New Helper Methods**:
|
103 |
| - |
| 102 | + |
104 | 103 | * `wrapAsync()`: For wrapping callables in async functions
|
105 | 104 | * `awaitPromise()`: For awaiting promise resolution
|
106 |
| - |
107 | 105 |
|
108 | 106 | ### Changed
|
109 | 107 |
|
|
124 | 122 | * **Error Propagation**: Improved how errors are propagated through Promise chains.
|
125 | 123 | * **Event Loop Management**: Fixed event loop management for proper async task execution.
|
126 | 124 |
|
127 |
| - |
128 | 125 | ---
|
129 | 126 |
|
130 | 127 | ## [v2.0.6](https://github.com/Thavarshan/fetch-php/compare/v2.0.5...v2.0.6) - 2025-05-03
|
|
151 | 148 | * Fixed duplicate implementation of `isRetryableError()` method.
|
152 | 149 | * Fixed retry failure detection to properly identify the last retry attempt.
|
153 | 150 |
|
154 |
| - |
155 | 151 | ---
|
156 | 152 |
|
157 | 153 | ## [v2.0.5](https://github.com/Thavarshan/fetch-php/compare/v2.0.4...v2.0.5) - 2025-03-30
|
|
162 | 158 |
|
163 | 159 | **Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/v2.0.4...v2.0.5](https://github.com/Thavarshan/fetch-php/compare/v2.0.4...v2.0.5)
|
164 | 160 |
|
165 |
| - |
166 | 161 | ---
|
167 | 162 |
|
168 | 163 | ## [v2.0.4](https://github.com/Thavarshan/fetch-php/compare/v2.0.3...v2.0.4) - 2025-03-30
|
|
189 | 184 |
|
190 | 185 | **Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/v2.0.3...v2.0.4](https://github.com/Thavarshan/fetch-php/compare/v2.0.3...v2.0.4)
|
191 | 186 |
|
192 |
| - |
193 | 187 | ---
|
194 | 188 |
|
195 | 189 | ## [v2.0.3](https://github.com/Thavarshan/fetch-php/compare/v2.0.2...v2.0.3) - 2024-12-06
|
|
204 | 198 |
|
205 | 199 | **Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/v2.0.2...v2.0.3](https://github.com/Thavarshan/fetch-php/compare/v2.0.2...v2.0.3)
|
206 | 200 |
|
207 |
| - |
208 | 201 | ---
|
209 | 202 |
|
210 | 203 | ## [v2.0.2](https://github.com/Thavarshan/fetch-php/compare/v2.0.1...v2.0.2) - 2024-10-19
|
|
224 | 217 |
|
225 | 218 | **Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/v2.0.1...v2.0.2](https://github.com/Thavarshan/fetch-php/compare/v2.0.1...v2.0.2)
|
226 | 219 |
|
227 |
| - |
228 | 220 | ---
|
229 | 221 |
|
230 | 222 | ## [v2.0.1](https://github.com/Thavarshan/fetch-php/compare/v2.0.0...v2.0.1) - 2024-10-03
|
|
234 | 226 | * Refactored `withBody()` in `ClientHandler` to accept only arrays and JSON-encode them.
|
235 | 227 | * Documentation and typo fixes.
|
236 | 228 |
|
237 |
| - |
238 | 229 | ---
|
239 | 230 |
|
240 | 231 | ## [v2.0.0](https://github.com/Thavarshan/fetch-php/compare/v1.2.0...v2.0.0) - 2024-09-30
|
|
265 | 256 | * Async error handling.
|
266 | 257 | * Persistent Guzzle client reuse.
|
267 | 258 |
|
268 |
| - |
269 | 259 | ---
|
270 | 260 |
|
271 | 261 | ## [v1.2.0](https://github.com/Thavarshan/fetch-php/compare/v1.1.1...v1.2.0) - 2024-09-27
|
|
288 | 278 | * Composer dependency conflicts.
|
289 | 279 | * Async exception handling.
|
290 | 280 |
|
291 |
| - |
292 | 281 | ---
|
293 | 282 |
|
294 | 283 | ## [v1.1.1](https://github.com/Thavarshan/fetch-php/compare/v1.1.0...v1.1.1) - 2024-09-25
|
|
302 | 291 |
|
303 | 292 | * Resolved Laravel 10 install conflict.
|
304 | 293 |
|
305 |
| - |
306 | 294 | ---
|
307 | 295 |
|
308 | 296 | ## [v1.1.0](https://github.com/Thavarshan/fetch-php/compare/v1.0.0...v1.1.0) - 2024-09-24
|
|
317 | 305 |
|
318 | 306 | * Single-instance Guzzle instantiation.
|
319 | 307 |
|
320 |
| - |
321 | 308 | ---
|
322 | 309 |
|
323 | 310 | ## v1.0.0 - 2024-09-14
|
|
0 commit comments