[英]Composer telling the wrong php version
I know many people are struggling into the "composer using the wrong php version" and the solution is to call composer with the good one (currently suggested duplicate). 我知道很多人都在为“使用错误的php版本的作曲者”而苦苦挣扎,而解决方案是调用具有好作曲者的作曲家(目前建议重复)。
Here is my case: 这是我的情况:
$ php -v
PHP 5.6.31 (cli) (built: Sep 8 2017 04:36:13)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
$ php /usr/local/bin/composer update
Problem 1
- This package requires php >=5.6.31 but your PHP version (5.5.9)
does not satisfy that requirement.
How can this be explained ? 如何解释呢?
For info, I'm using the official php:5.6-fpm
docker image. 有关信息,我使用的是官方的
php:5.6-fpm
docker映像。 And I installed composer
with: 我安装了
composer
:
$ curl -sS https://getcomposer.org/installer
| php -- --install-dir=/usr/local/bin --filename=composer
I just realized this config at the bottom of my composer.json
: 我刚刚在
composer.json
的底部意识到了这个配置:
"config": {
"platform": {
"php": "5.5.9"
}
},
That's the version on which it bases his warning (not the one actually used) 这就是警告的依据版本(不是实际使用的警告)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.