Override PHP base dependency in composer
You can use --ignore-platform-reqs
option for composer commands like install
, update
etc.
--ignore-platform-reqs: ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these. See also the platform config option.
https://getcomposer.org/doc/03-cli.md
So you can try with
composer install --ignore-platform-reqs
The error message indicates a requirement from the main composer.json
. The version requirement can be just adapted:
"require": {
"php": ">=5.5",
After changing the version like this I get:
Problem 1
- Installation request for classpreloader/classpreloader 2.0.0 -> satisfiable by classpreloader/classpreloader[2.0.0].
- classpreloader/classpreloader 2.0.0 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 2
- Installation request for laravel/framework v5.1.17 -> satisfiable by laravel/framework[v5.1.17].
- laravel/framework v5.1.17 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 3
- Installation request for laravelcollective/html v5.1.6 -> satisfiable by laravelcollective/html[v5.1.6].
- laravelcollective/html v5.1.6 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
Problem 4
- laravel/framework v5.1.17 requires php >=5.5.9 -> your PHP version (5.5.6) or "config.platform.php" value does not satisfy that requirement.
- jenssegers/agent v2.1.7 requires illuminate/support ~4.0|~5.0 -> satisfiable by laravel/framework[v5.1.17].
- Installation request for jenssegers/agent v2.1.7 -> satisfiable by jenssegers/agent[v2.1.7].
Using the following snippet in composer.json
, a php version can be simulated
[...]
"config": {
"preferred-install": "dist",
"platform": {
"php": "5.5.9"
}
}
Doc: https://getcomposer.org/doc/06-config.md#platform
platform
Lets you fake platform packages (PHP and extensions) so that you can emulate a production env or define your target platform in the config. Example: {"php": "5.4", "ext-something": "4.0"}.
Don't forget to run a composer.phar update
after this