User Tools

Site Tools


info:devel:composer

Composer

For those of you building applications that require Composer, this can be a little tricky on BlueOnyx. Our platform has very restrictive controls on a number of PHP settings that improve server security, but cause grief for Composer.

Below is a quick guide that I have created for my own reference (so I don't have to research this next time). I hope it is useful.

Download / Get Composer

Composer uses some funky code to do an initial install and download. The command below will install composer, with some additional PHP options to bypass two standard blueonyx settings that would otherwise prevent downloading of the Composer archive.

curl -sS https://getcomposer.org/installer | php -d allow_url_fopen=On -d open_basedir=

Using composer

Standard documentation tells you to move the composer.phar file to a location that exists in the path and just execute the file. Again, our non-standard PHP settings prevent this from working. So. Whats the alternative?

The command below will execute composer.phar

php -d allow_url_fopen=1 -d open_basedir= composer.phar command [options] [arguments]

For example… To install project dependencies for a php application that you have downloaded, you could use the command below:

php -d allow_url_fopen=1 -d open_basedir= composer.phar install
info/devel/composer.txt · Last modified: 2016/01/24 10:28 by