Skip to content

Commit

Permalink
Clarifies change in parsing headers
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hofsaess <florian.hofsaess@check24.de>
  • Loading branch information
florianhofsaessC24 committed Jun 28, 2022
1 parent 2b88060 commit d88c90d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/book/v2/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ The first approach may fail if libraries you depend on specifically require a
version 1 release. The second approach may leave you on a version 1 release in
situations where other libraries you depend on require version 1.

In all cases, if you are only using the PSR-7 implementations and/or the
`ServerRequestFactory::fromGlobals()` functionality, upgrading to version 2 will
pose no backwards compatibility issues.

## Changed

- `Laminas\Diactoros\RequestTrait` now raises an `InvalidArgumentException` in
Expand All @@ -42,6 +38,12 @@ pose no backwards compatibility issues.
`UnexpectedValueException` due to an unexpected HTTP method; this is due to the
fact that the HTTP method value can no longer be set to an invalid value.

- `Laminas\Diactoros\marshalHeadersFromSapi()` is parsing headers differently compared to the legacy implementation.
As a consequence Headers with `'0'` as values will be part of the parsed Headers.
In former versions those headers were ignored.
Usages of `\Laminas\Diactoros\MessageTrait::hasHeader()` and `\Laminas\Diactoros\MessageTrait::getHeader()`
might be affected if you are using `ServerRequestFactory::fromGlobals()` functionality.

## Removed

Several features were removed for version 2. These include removal of the
Expand Down

0 comments on commit d88c90d

Please sign in to comment.