laminas / laminas-diactoros

PSR HTTP Message implementations
https://docs.laminas.dev/laminas-diactoros/
BSD 3-Clause "New" or "Revised" License
484 stars 64 forks source link

LAMINAS_DIACTOROS_STRICT_CONTENT_HEADER_LOOKUP should be enabled by default #203

Open bcremer opened 5 days ago

bcremer commented 5 days ago

Feature Request

Q A
New Feature yes
RFC no
BC Break yes(ish)

Summary

The Env-Variable LAMINAS_DIACTOROS_STRICT_CONTENT_HEADER_LOOKUP was introduced in 2.x to fix a bug. The fix was opt-in and was supposed to be enabled by default for 3.x. This never happened.

See: https://github.com/laminas/laminas-diactoros/pull/66#issuecomment-2470020209

Any advice how to proceed? Which version should be targeted for that change?

gsteel commented 5 days ago

I haven't looked at this in detail, but it looks like a probable BC break to enable it by default - since the 3.0 ship has sailed, I'll add this issue to the 4.0 milestone so it must be addressed then

bcremer commented 4 days ago

If it's a major version anyway I'd like to remove the LAMINAS_DIACTOROS_STRICT_CONTENT_HEADER_LOOKUP variable entirely and always apply the fix without giving an option to opt-out. What do you think?

gsteel commented 4 days ago

I don't know enough about this right now to comment, but the dependence on an env var to fix what appears to be non-standard behaviour seems less than ideal, therefore I'd personally be in favour of getting rid of it for 4.x

There's no release branch for 4.0.x yet but that can easily be solved and it will be cut from the tip of the current 3.6.x branch when required.

cc @weierophinney, @Xerkus