我正在尝试为CakePHP安装WyriHaximus的Ratchet插件以使用WebSockets。我在Cakes composer.json中添加了以下行:
"require": {
"php": ">=5.2.8",
"ext-mcrypt": "*",
"react/socket": "0.3.*|0.4.*",
"wyrihaximus/ratchet": "dev-master"
},
"config": {
"vendor-dir": "/app/Vendor/"
},
当我在CLI中运行"composer update"时,它会抛出以下错误,尽管我运行的是PHP 5.5:
Problem 1
- Installation request for wyrihaximus/ratchet dev-master -> satisfiable by wyrihaximus/ratchet[dev-master].
- wyrihaximus/ratchet dev-master requires php >=5.4.0 -> no matching package found.
原因是什么?如何解决?
查看该输出,您没有PHP5.4或更高版本。您可以使用php -v
进行检查。