1
0
Fork 0

add documentation for preferred-install changes

pull/3790/head
Steve Buzonas 2015-04-18 21:11:04 -04:00
parent b44c3bee52
commit 20745f839c
1 changed files with 23 additions and 2 deletions

View File

@ -743,7 +743,8 @@ The following options are supported:
will also look for classes in the PHP include path. will also look for classes in the PHP include path.
* **preferred-install:** Defaults to `auto` and can be any of `source`, `dist` or * **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 `auto`. This option allows you to set the install method Composer will prefer to
use. use. Can optionally be a hash of patterns for more granular install preferences.
See example below.
* **store-auths:** What to do after prompting for authentication, one of: * **store-auths:** What to do after prompting for authentication, one of:
`true` (always store), `false` (do not store) and `"prompt"` (ask every `true` (always store), `false` (do not store) and `"prompt"` (ask every
time), defaults to `"prompt"`. time), defaults to `"prompt"`.
@ -822,6 +823,26 @@ Example:
> besides your `composer.json`. That way you can gitignore it and every > besides your `composer.json`. That way you can gitignore it and every
> developer can place their own credentials in there. > developer can place their own credentials in there.
preferred-install Example:
```json
{
"config": {
"preferred-install": {
"my-organization/stable-package": "dist",
"my-organization/*": "source",
"partner-organization/*": "auto",
"*": "dist"
}
}
}
```
> **Note:** Order matters. More specific patterns should be earlier than
> more relaxed patterns. When mixing the string notation with the hash
> configuration in global and package configurations the string notation
> is translated to a `*` package pattern.
### scripts <span>(root-only)</span> ### scripts <span>(root-only)</span>
Composer allows you to hook into various parts of the installation process Composer allows you to hook into various parts of the installation process