Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to **initphp/http** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [5.0.0] - 2026-11-25

### Changed (breaking)

Expand All @@ -16,6 +16,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Retry-After` is now capped at the policy's `maxDelay`. Previously a server could make the client wait for as long as it asked (`Retry-After: 3600` meant an hour).
- A request whose body is not seekable is no longer retried. The retry used to send an empty body, because the first attempt had already consumed the stream; now the first response is returned, or the first exception is thrown.

### Documentation

- New [Client Retry](docs/Client-Retry.md) page: every `RetryPolicy` argument and
clamp, the backoff formula, `Retry-After` parsing and the sleeper seam. It is
linked from the API reference, Client Configuration, the PSR-18 client page and
the sidebar. The README and Client Configuration describe the idempotent-only
retry, the non-seekable body rule and the `Retry-After` cap.
- The recipes were corrected: proxying (hop-by-hop headers are matched
case-insensitively and by `Connection`, `Host` is not copied, a caching caveat),
JSON responses (CORS answers only allow-listed origins instead of reflecting
`Origin`), redirects (the session cookie is `Secure`) and file uploads (the
server picks the name, the detected media type and a size limit are enforced).
- The `MessageTrait` anchor in the API reference was repaired.
- The deprecation notes for the `Facadeble[Interface]` aliases (README, Migration
Guide, Facades) now say they will be removed in a future major release; they
said 4.0, and the aliases are still present in 5.0.0.

## [4.0.0] - 2026-11-22

### Changed (breaking)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Version 3.0 is a breaking release. The highlights:
- `Request::createFromGlobals()` and the magic `$request->name = $value` parameter bag have been **removed**. Use `ServerRequest::createFromGlobals()` (now stateless) and `$request->getParsedBody()` instead.
- `Client::sendRequest()` no longer inspects the concrete `Request` class — it only sees the PSR-7 contract. Pre-encode array/DOM/XML payloads before calling.
- `Client` now defaults to a 30 s request timeout and 10 s connect timeout. Pass `->withTimeout(0)` if you need the legacy "no timeout" behaviour.
- The misspelled facade trait/interface names `Facadeble[Interface]` are now `Facadable[Interface]`; the old names remain as `@deprecated` aliases and will be removed in 4.0.
- The misspelled facade trait/interface names `Facadeble[Interface]` are now `Facadable[Interface]`; the old names remain as `@deprecated` aliases and will be removed in a future major release.

See [`docs/Migration-Guide.md`](docs/Migration-Guide.md) for the full migration walk-through and a copy-pasteable code-mod list.

Expand Down
2 changes: 1 addition & 1 deletion docs/Facades.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ use InitPHP\HTTP\Facade\Traits\Facadeble;
use InitPHP\HTTP\Facade\Interfaces\FacadebleInterface;
```

The deprecated names will be removed in the next major release.
The deprecated names will be removed in a future major release.

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/Migration-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ $client = (new Client())->withTimeout(0)->withConnectTimeout(10);
+ use InitPHP\HTTP\Facade\Interfaces\FacadableInterface;
```

The old names remain as `@deprecated` aliases and continue to work, but will be removed in 4.0.
The old names remain as `@deprecated` aliases and continue to work, but will be removed in a future major release.

### 10. `Response::redirect()` always sets `Location`

Expand Down
Loading