Install all dependencies from source
Run
$ composer install --prefer-source
to install all dependencies from source (where available).
See https://getcomposer.org/doc/03-cli.md#install:
--prefer-source: There are two ways of downloading a package: source and dist. For stable versions Composer will use the dist by default. The source is a version control repository. If --prefer-source is enabled, Composer will install from source if there is one. This is useful if you want to make a bugfix to a project and get a local git clone of the dependency directly.
Install selected dependencies from source
Alternatively, configure selected dependencies to be installed from source (or dist) under the preferred-install section in composer.json:
{
"config": {
"preferred-install": {
"foo/bar": "source",
"bar/baz": "source",
"*": "dist"
}
}
}
See https://getcomposer.org/doc/06-config.md#preferred-install:
Defaults to auto and can be any of source, dist or auto. This option allows you to set the install method Composer will prefer to use. Can optionally be a hash of patterns for more granular install preferences.