From 20745f839cb497611449e62c3e3f3f59aff1b070 Mon Sep 17 00:00:00 2001 From: Steve Buzonas Date: Sat, 18 Apr 2015 21:11:04 -0400 Subject: [PATCH] add documentation for preferred-install changes --- doc/04-schema.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/04-schema.md b/doc/04-schema.md index 587f9da29..be1303b2a 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -743,7 +743,8 @@ The following options are supported: will also look for classes in the PHP include path. * **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. + 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: `true` (always store), `false` (do not store) and `"prompt"` (ask every time), defaults to `"prompt"`. @@ -822,6 +823,26 @@ Example: > besides your `composer.json`. That way you can gitignore it and every > 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 (root-only) Composer allows you to hook into various parts of the installation process @@ -910,4 +931,4 @@ Then "composer show -s" will give you `versions : * dev-latest-testing`. Optional. -← [Command-line interface](03-cli.md) | [Repositories](05-repositories.md) → \ No newline at end of file +← [Command-line interface](03-cli.md) | [Repositories](05-repositories.md) →