我正在尝试将 phpredis 扩展设置为我的应用程序的要求。这是我的 composer.json:
"ext-redis": ">=2.2.7"
我还尝试了这些选项:"^2.2.7"
、2.2.7@dev
但我一直收到以下错误:
Problem 1
- The requested PHP extension ext-redis >=2.2.7 has the wrong version (2.2.8-devphp7) installed. Install or enable PHP's redis extension.
为什么我对 >=2.2.7
的要求与似乎符合此版本限制的实际版本 2.2.8-devphp7
不一致?
最佳答案
版本 2.2.8-devphp7
就是 not supported and resolves to 0 :
We simply cannot parse it. This means that the installed version ends up being unrecognized, and thus it defaults to 0
并且永远不会被支持:
您必须将该版本视为 0 并通过 discouraged 允许它*
约束。
更新:自composer-1.1.1起支持
关于php - Composer 需要 ext-redis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36794463/