Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify how zero-valued header parsing changed from diactoros 1.x to 2.x #93

Merged
merged 1 commit into from Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/book/v2/migration.md
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