I need to have 2 different composer.json
files for dev
and production
because I am developing vendor packages (locally) and would like to keep my vendor packages symlinked on dev environment because it's much easier to maintain.
The composer.json
files contain:
NOTE : The vendor packages are in require
, and not require-dev
... So an composer update --no-dev
will not work.
How could I set this up?
Usually, the .env
file is where you set different environment variables. Is there a way to set a COMPOSER_PATH
variable that would point to the 2 different files on prod or dev?
您可以使用环境变量来拥有一个以上的composer文件,例如composer.json
和composer-testing.json
,并在终端中使用以下文件:
COMPOSER=composer-testing.json php composer.phar install
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.