Composer: When running composer update --prefer-source on a pre-existing vendor folder, it doesn't prefer source

Created on 7 Mar 2015  路  3Comments  路  Source: composer/composer

When running composer update --prefer-source on a pre-existing vendor folder, it doesn't prefer source, instead it downloads dists.

Most helpful comment

@RdeWilde run composer config -g preferred-install source and all your packages will be installed from source on that machine from now on.

All 3 comments

Yes packages already installed as dist will remain so, if you want to force a package to be installed as source you should rm -rf vendor/foo/bar and then run composer install or update with --prefer-source and that one will get installed from source.

@Seldaek Is it possible to default --prefer-source when composer runs in 'dev' mode? Or maybe default it for the 'require-dev' section with the possibility to override packages from the 'require' to force sources?

@RdeWilde run composer config -g preferred-install source and all your packages will be installed from source on that machine from now on.

Was this page helpful?
0 / 5 - 0 ratings