Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 916
Maveric Avatar asked Jan 24 '16 00:01

Maveric


1 Answers

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.

like image 58
Federkun Avatar answered Nov 15 '22 08:11

Federkun