Releases: leafsphp/fetch
Releases · leafsphp/fetch
Release list
🐕 Retriever
v5.0 - 13 Aug 2026
Added
- Arrays passed as
dataon POST, PUT, PATCH and DELETE are sent as JSON automatically, nojson_encode()needed - Added
timeoutsupport in seconds, per-request or app-wide viaFetch::config() - Added
verifyHostandverifyPeeroptions with correct TLS semantics - JSON responses are decoded for you
- Added a Pest test suite, run through Alchemy (fetch's first)
Fixed
- cURL failures throw a clear exception naming the failing URL, instead of failing quietly
- Every documented option is honoured — options you set no longer silently do nothing
- Cleaned up functional-mode initialization
Changed
- Fetch now requires PHP 8.2+ and jumps from v0.3 to v5.0 to version alongside the rest of Leaf 5
📡 Signal
v0.3 – 22 Dec 2025
Added
- Automatic formatting of request headers into proper
Header: valuestrings. - Support for
application/x-www-form-urlencodedpayloads - Explicit handling for Basic Auth via
auth.usernameandauth.password. - Improved extensibility by allowing user-provided cURL options to be merged cleanly.
Fixed
- Inconsistent header handling when custom headers were provided.
- Incorrect POST body handling when sending array data.
- Edge cases where
HEADrequests still returned a response body. - Potential SSL verification misconfiguration when
verifyHostwas disabled. - Header/body parsing reliability by consistently using
header_size.
Changed
- Switched from internal multiple
curl_setoptcalls to a singlecurl_setopt_arraycall. - JSON payloads are now explicitly encoded before being sent.
- Improved internal request flow readability and maintainability.
- Deprecated inline cURL auth configuration in favor of structured
authinput.
Removed
- Legacy HTTP auth logic
- Implicit header passing without normalization.
☢️ Gamma
v0.2 - 27 Oct 2024
Added
- Made fetch function friendly
- Added support for building full requests by passing array into
fetch()
Fixed
- Removed
fetch()function dependence on namespace
Changed
fetch()now works without Leaf's functional mode