I'm using the doctrine/dbal
(v2.4.*) package in my PHP project. My production server runs PHP v5.6.
I ran composer update
this morning which updated my composer.lock file. Now, when I'm deploying to production, I see this:
Problem 1
- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.14) does not satisfy that requirement.
Problem 2
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.14) does not satisfy that requirement.
- doctrine/common v2.4.3 requires doctrine/inflector 1.* -> satisfiable by doctrine/inflector[v1.2.0].
- Installation request for doctrine/common v2.4.3 -> satisfiable by doctrine/common[v2.4.3].
Specifically these:
doctrine/common v2.4.3 requires doctrine/inflector 1.* -> satisfiable by doctrine/inflector[v1.2.0].
doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.14) does not satisfy that requirement
This means, that even if dbal
is old, it requires the newest common
, and common
requires the newest inflector
package. Problem is that inflector
started depending on PHP7 to run.
Is there any way in Composer to limit updating of the packages to those supported by specific PHP version? Like saying: "Please update what you can, but only if the server's PHP version is sufficient."
doctrine/dbal
but alsocommon
andinflector
? Does this make sense ifdbal
already requires them?dbal
version I'm using is2.4.*
. So, it's old. But as it requires newest packages internally, it doesn't matter how old it is.composer require doctrine/inflector:1.1.0