Maveric
Maveric

Reputation: 99

How to work around ubuntu php version for composer update

I'm trying to update my symfony project using composer. I'm running into a strange issue I'm not really sure how to handle. My php version is high enough to update but its formatted in such a way composer wont let me update. Here's my error message:

Your requirements could not be resolved to an installable set of packages.



Problem 1
    - symfony/symfony v3.0.1 requires php >=5.5.9 -> your PHP version (5.6.11-1ubuntu3.1) does not satisfy that requirement.
    - symfony/symfony v3.0.0 requires php >=5.5.9 -> your PHP version (5.6.11-1ubuntu3.1) does not satisfy that requirement.
    - Installation request for symfony/symfony 3.0.* -> satisfiable by symfony/symfony[v3.0.0, v3.0.1].

As you can see, my php version is indeed high enough to update, however, composer says no. How to I force it to update anyway?

Upvotes: 6

Views: 602

Answers (1)

Federkun
Federkun

Reputation: 36924

How to I force it to update anyway?

With the --ignore-platform-reqs option composer ignore all the php, ext-*, lib-* requirements and force the installation even if the local machine does not fulfill these.

composer install --ignore-platform-reqs

composer update --ignore-platform-reqs

The option is available also for create-project, remove and require.

The documentation can be read here.

Upvotes: 11

Related Questions