Open alexc-jeromes opened 1 month ago
Out of curiosity, what's your use case for different composer.json
files per environment? Surely, you'd want the same dependencies installed in all environments?
Developing new addons (we have 40+ custom), basically. We build them into the addons/
dir, then they are committed into a Gitlab repo, which is connected to a Satis Server composer registry. Production uses the remote, local devs use the addons path.
Devs need to use their dev copy of a package/addon when running Composer, and production must only use the code they produce which has had its tests/stability tagged.
When I've ever needed to do that in the past, I've achieved it by adding the repositories to my global composer.json
/config.json
files, instead of creating separate composer.json
files:
{
"repositories": [
{
"type": "path",
"url": "~/Code/path-to-addon-one"
},
{
"type": "path",
"url": "~/Code/path-to-addon-two"
},
]
}
Bug description
We use
composer.local.json
andcomposer.production.json
which are decided on with the env varCOMPOSER=${ENV}
.This works fine within Laravel as it uses Composer's env vars. Statamic has hard-coded links to
composer.json
which error hard duringpackage:discover
and other commands.Example:
Statamic\Console\Composer\Json
How to reproduce
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response