How to use composer with phpbrew?

2.7k Views Asked by At

I installed phpbrew to use php 5.4 in Ubuntu 14.04. It works fine, except when I try to use composer, which ignores phpbrew and installs dependencies related to php 5.5.

Is there a way to force composer to be compatible with phpbrew config? I trying to add: php: "5.4" in my composer.json, but it says that this requirement is not possible with my php version.

2

There are 2 best solutions below

0
On

I was getting an error as app is not a valid command. To fix this, I used brew install composer.

1
On

You can easy install composer with phpbrew by following command:

$ phpbrew app get composer

Source: https://github.com/phpbrew/phpbrew Section: Installing Extra Apps