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).
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.
And I installed composer
with:
$ curl -sS https://getcomposer.org/installer
| php -- --install-dir=/usr/local/bin --filename=composer