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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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 ofcomposer.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.