http-interop / http-server-handler

Interface for PSR-15 server request handler
MIT License
20 stars 1 forks source link

"replace" http-interop/http-middleware in composer? #3

Closed michalbundyra closed 6 years ago

michalbundyra commented 6 years ago

Should we have:

"replace": {
    "http-interop/http-middleware": "0.*"
}

in composer.json?

https://getcomposer.org/doc/04-schema.md#replace

shadowhand commented 6 years ago

I think that would make sense. @http-interop/http-request-handlers anyone else?

oscarotero commented 6 years ago

Good for me too.

weierophinney commented 6 years ago

The problem with having replace in there is that it doesn't allow us to install them side-by-side. That means that if a developer adds this package to their repo, it will remove a previous http-middleware installation... and their existing code is now broken.

If we do not include this, then somebody can provide a shim that adapts existing code to the new interfaces, allowing them to live side-by-side while the developer iteratively updates their code to the new interfaces.

michalbundyra commented 6 years ago

@weierophinney Please note that both libraries have exactly the same namespaces and interfaces names. I think then it will be not possible use both side-by-side and we need either "conflict" or "replace".

weierophinney commented 6 years ago

@webimpress I missed that aspect; I was assuming this package had different namespace(s).

In that case, however, the conflict only occurs starting with 0.5, does it not? As such, I'd recommend ">=0.5.0" instead.