Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Empty header check breaking change #356

Open
soundsgoodsofar opened this issue Mar 19, 2019 · 4 comments
Open

Empty header check breaking change #356

soundsgoodsofar opened this issue Mar 19, 2019 · 4 comments

Comments

@soundsgoodsofar
Copy link

The following commit causes breaking issues and probably should not have been implemented in a minor version.

ee4bcdc#diff-5abca4d9d5693da46d10a54795b1192d

Specifically this change breaks laravel/passport ^3.0 which depends on ~1.0 of this library.

I've opened a ticket for them to patch branch 3.x, but that patch may introduce new problems. That's why I'd suggest this update be reverted from 1.x of the zend framework.

@weierophinney
Copy link
Member

This is problematic to back out of the 1.8 series of zend-diactoros.

The patch that introduced it, #325, did so in order to make the library comply correctly with the PSR-7 specification. Essentially, by not checking it, we had introduced a bug in our implementation.

That also means that, on the flip side, if you were relying on that behavior previously, you were relying on a bug.

If laravel/passport requires the original behavior, one solution is to do the following in your composer.json:

"require": {
    "zendframework/zend-diactoros": "~1.0"
},
"conflict": {
    "zendframework/zend-diactoros": "1.8.6"
}

Pinging @Ocramius — thoughts on reverting #325 for the 1.8 series?

@driesvints
Copy link

Hey everyone. Seems that the problem lies with Symfony HttpFoundation's ServerBag class and not with Passport itself. See laravel/passport#992

@driesvints
Copy link

My 2 cents on the issue: I wouldn't revert the change if it was a bug fix to comply to PSR-7 more. Implementing libraries were relying on faulty behavior like @weierophinney noted.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-diactoros; a new issue has been opened at laminas/laminas-diactoros#8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants