From 751190aafd14730ea4711fa35fced0f32f24dcaf Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 17 Oct 2014 17:21:48 +0100 Subject: [PATCH] Add new github-expose-hostname to docs/schema/config command, refs #3164 --- doc/04-schema.md | 3 +++ res/composer-schema.json | 4 ++++ src/Composer/Command/ConfigCommand.php | 1 + 3 files changed, 8 insertions(+) diff --git a/doc/04-schema.md b/doc/04-schema.md index 2ebff5a30..c768edb72 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -790,6 +790,9 @@ The following options are supported: the autoloader. * **github-domains:** Defaults to `["github.com"]`. A list of domains to use in github mode. This is used for GitHub Enterprise setups. +* **github-expose-hostname:** Defaults to `true`. If set to false, the OAuth + tokens created to access the github API will have a date instead of the + machine hostname. * **notify-on-install:** Defaults to `true`. Composer allows repositories to define a notification URL, so that they get notified whenever a package from that repository is installed. This option allows you to disable that behaviour. diff --git a/res/composer-schema.json b/res/composer-schema.json index 9b1b31d42..95cd199e3 100644 --- a/res/composer-schema.json +++ b/res/composer-schema.json @@ -203,6 +203,10 @@ "items": { "type": "string" } + }, + "github-expose-hostname": { + "type": "boolean", + "description": "Defaults to true. If set to false, the OAuth tokens created to access the github API will have a date instead of the machine hostname." } } }, diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index 67a2f70a8..ab3f1e8e8 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -323,6 +323,7 @@ EOT 'autoloader-suffix' => array('is_string', function ($val) { return $val === 'null' ? null : $val; }), 'optimize-autoloader' => array($booleanValidator, $booleanNormalizer), 'prepend-autoloader' => array($booleanValidator, $booleanNormalizer), + 'github-expose-hostname' => array($booleanValidator, $booleanNormalizer), ); $multiConfigValues = array( 'github-protocols' => array(