Ad
Laravel: Different Composer.json Files For Dev And Production
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:
- For development, it has symlinked repositories by path.
- For production, it has private repositories on github.
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?
Ad
Answer
You could use environment variables to have more than one composer files like composer.json
and composer-testing.json
and use it in a terminal with:
COMPOSER=composer-testing.json php composer.phar install
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad