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

Conversation

S1ructure
Copy link

@S1ructure S1ructure commented Jun 27, 2022

Signed-off-by: Florian Hofsaess florian.hofsaess@check24.de

Q A
Documentation yes
Bugfix no
BC Break no
New Feature no
RFC no
QA no

Description

Since the old implementation didn't add headers with '0' as content there is a significant change in parsing headers. That said the hasHeader will lead to true starting with ^2

Especially when headers are used for handling specific logic it will lead to a significant impact.

I'd say that the old implementation was buggy here. Fixing this bug should be mentioned in documentation to enable users to review their usages of hasHeader and getHeaders activly

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall OK with the changes, but:

  1. ::fromGlobals() is the entry point (and should be mentioned)
  2. check CI failures :)

@S1ructure
Copy link
Author

Overall OK with the changes, but:

  1. ::fromGlobals() is the entry point (and should be mentioned)
  2. check CI failures :)

done :)

docs/book/v2/migration.md Outdated Show resolved Hide resolved
Signed-off-by: Florian Hofsaess <florian.hofsaess@check24.de>
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks @S1ructure!

@Ocramius Ocramius changed the title Clarifies change in parsing headers Clarify how zero-valued header parsing changed from diactoros 1.x to 2.x Jun 28, 2022
@Ocramius Ocramius merged commit 22928ab into laminas:2.12.x Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants