Version 2.13.0
Enhancement
- 106: Refined types as per laminas/laminas-coding-standard:2.3.x upgrades thanks to @Ocramius
- 103: Update to laminas/laminas-coding-standard:2.3.x, improved types and internal API thanks to @gsteel
Version 2.12.0
Bug
- 99: Merge release 2.11.3 into 2.12.x thanks to @github-actions[bot]
- 92: Fix typo in property name in UploadedFileTest::setUp() thanks to @TimWolla
Enhancement
- 97: Ignore obviously malformed host headers when constructing a ServerRequest thanks to @TimWolla
- 91: Fix typo thanks to @PhantomWatson
Version 2.11.3
Bug, Enhancement
- 98: Fixed UploadedFile::moveTo() so it actually removes the original file when used in CLI context, and doesn't leave orphaned files thanks to @k2rn
Version 2.11.2
Bug
- 95: Resolve Host header and X-Forwarded-Proto regressions thanks to @weierophinney
Release Notes for 2.11.1
This is a SECURITY release. All users are encouraged to upgrade immediately.
Added
This release adds features to allow filtering a ServerRequest as generated by Laminas\Diactoros\ServerRequestFactory::fromGlobals() for the purposes of initialization. Examples include:
- Adding a request identifier.
- Using X-Forwarded-* headers to modify the URL to represent the original client request.
The features are based on a new interface, Laminas\Diactorors\ServerRequestFilter\FilterServerRequestInterface, which defines a single method:
public function __invoke(
\Psr\Http\Message\ServerRequestInterface $request
): \Psr\Http\Message\ServerRequestInterface
We provide two implementations, as follows:
- Laminas\Diactoros\ServerRequestFilter\DoNotFilter will return the provided request verbatim.
- Laminas\Diactoros\ServerRequestFilter\FilterUsingXForwardedHeaders has named constructors that allow you to define how and when X-Forwarded-* headers are used to modify the URI instance associated with the request.…