middlewares / utils

Common utils used by PSR-15 middlewares
MIT License
51 stars 12 forks source link

v0.13.0 breaks compatibility with all older middlewares #5

Closed moufmouf closed 6 years ago

moufmouf commented 6 years ago

Hey @oscarotero,

Version v0.13.0 of middleware/utils is wreaking havok on previous versions of all your middleware/* packages.

Here is the issue I am facing.

I'm using your middleware/whoops package. I'm stuck with v0.4.1 because I'm using http-interop/http-middleware v0.4 in my own middlewares.

Everything was working flawlessly until you introduced v0.13.0 of middleware/utils.

The problem:

v0.13.0 removes "http-interop/http-middleware": "^0.5". https://github.com/middlewares/utils/commit/296dc6129e934ac0db20f279d962cad46226cde3

Because of this, middleware/whoops v0.4.1 becomes compatible with middleware/utils v0.13.0.

When I install middleware/whoops v0.4.1, I'm installing middleware/utils v0.13.0, instead of middleware/utils v0.11 (which is the latest compatible version).

I see 2 possible ways to solve this problem.

Solution 1:

It's easy, but it will only solve the problem if you remove the v0.13.0 tag from middleware/utils. Not very clean, but possible.

Solution 2:

It's cleaner but it requires a hell lot more work to solve.

Whatever solution you choose, I'll be happy to contribute PRs.

oscarotero commented 6 years ago

Thanks for reporting! I'm inclined for the solution 1, which although is not the ideal currently (I'm agree that delete a tag and create again is not clean), it's what I had to do before release this version. What do you think? Do you like to work in a PR?

moufmouf commented 6 years ago

PR sent. Thanks for the quick reply!