composer install from source with platform.sh recipe
Opened this issue · 3 comments
platform.sh runs composer install
with --prefer-dist
, see https://docs.platform.sh/languages/php.html#build-flavor
Lando seems to also use the --prefer-dist
flag. With lando, I'd like to install packages by cloud-solutions from source, so I add the following to my composer.json, see https://getcomposer.org/doc/06-config.md#preferred-install:
"config": {
"preferred-install": {
"cloud-solutions/*": "source"
}
}
However, the --prefer-dist
flag specified for composer install
takes precedence, see https://getcomposer.org/doc/03-cli.md#install-i. My config is therefore ignored.
Is there a way to override the composer install flags platform.sh uses?
Hmm, I'm guessing this is something that you'd need to configure in the Platform.sh config files if it is possible; maybe @chadwcarlson or someone else would have an idea of the top of their head...
@reynoldsalec Ideally, on platform.sh I would like to install all dependencies from dist, so the --prefer-dist
flag makes sense. On lando however, it would be great to be able to override this and install certain dependencies from source, since it's meant for local development.
For now, I'm using a build-step to delete and reinstall our own dependencies from source:
run:
- rm -rf vendor/cloud-solutions; composer update --prefer-source cloud-solutions/*