Failed to install with composer (Conclusion: don't install http-interop/http-factory)
filisko opened this issue · comments
Hi @oscarotero,
When I've done "composer require middlewares/encoder", the following happened:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for middlewares/encoder ^0.3.2 -> satisfiable by middlewares/encoder[v0.3.2].
- middlewares/encoder v0.3.2 requires middlewares/utils ~0.11 -> satisfiable by middlewares/utils[v0.11.0, v0.11.1].
- middlewares/utils v0.11.0 requires http-interop/http-factory ^0.3 -> satisfiable by http-interop/http-factory[0.3.0].
- middlewares/utils v0.11.1 requires http-interop/http-factory ^0.3 -> satisfiable by http-interop/http-factory[0.3.0].
- Conclusion: don't install http-interop/http-factory 0.3.0
My composer.json looks like:
"mindplay/middleman": "^2.0",
"zendframework/zend-diactoros": "^1.3",
"pimple/pimple": "^3.0",
"symfony/var-dumper": "^3.1",
"league/plates": "^3.1",
"middlewares/whoops": "^0.1.0",
"middlewares/aura-router": "^0.1.1",
"middlewares/debugbar": "^0.1.0",
"middlewares/aura-session": "^0.1.0",
"oscarotero/psr7-middlewares": "^3.17",
"middlewares/php-session": "^0.1.0",
"maximebf/debugbar": "^1.13",
"middlewares/negotiation": "^0.1.0"
"willdurand/negotiation": "^2.2",
"middlewares/error-handler": "^0.1.0"
Any ideas why that could happen?
you are using old versions of these middlewares (v0.1.0) that have old dependencies, so you need an old version of middlewares/encoder (I guess this is due mindplay/middleman
, that doesn't have support for the latest version of psr-15 middlewares).
Other option is use a different dispatcher (there are more options: https://github.com/middlewares/awesome-psr15-middlewares/#dispatcher) to allows to upgrade all middlewares to the latest version.
I see, thank you @oscarotero, I will have a look later and tell you more.
Perfect, I actually used your dispatcher https://github.com/oscarotero/middleland, looks nice!
My packages were just too out of date. Did a good update.
I had the Aura Router middleware package where you could use a method like arguments($container) when added to the dispatcher, it seems that now the RequestHandler does this.
Thank you!