Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer - specify `composer.json` path

Is it possible to specify the path to the composer.json file using the cli commands? Even better, is it possible to user a file with a different name?

like image 820
marcosh Avatar asked Aug 03 '16 13:08

marcosh


1 Answers

I would suggest you take a look at this: https://getcomposer.org/doc/03-cli.md#environment-variables

COMPOSER

By setting the COMPOSER env variable it is possible to set the filename of composer.json to something else.

For example:

COMPOSER=composer-other.json php composer.phar install

The generated lock file will use the same name: composer-other.lock in this example.

like image 64
sietse85 Avatar answered Nov 10 '22 19:11

sietse85