From 0f8530ef56643d6b6d4aa13565671fff92e9ad6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20M=C3=A1rton?= Date: Mon, 4 Mar 2013 20:27:59 +0100 Subject: [PATCH] Support for 'prefer-source' config setting, refs #553 --- src/Composer/Command/ConfigCommand.php | 4 ++++ src/Composer/Config.php | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index 4c2e9e5d8..03f090231 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -255,6 +255,10 @@ EOT function ($val) { return in_array($val, array('true', 'false', '1', '0'), true); }, function ($val) { return $val !== 'false' && (bool) $val; } ), + 'prefer-source' => array( + function ($val) { return in_array($val, array('true', 'false', '1', '0'), true); }, + function ($val) { return $val !== 'false' && (bool) $val; } + ), 'notify-on-install' => array( function ($val) { return in_array($val, array('true', 'false', '1', '0'), true); }, function ($val) { return $val !== 'false' && (bool) $val; } diff --git a/src/Composer/Config.php b/src/Composer/Config.php index 0d9aa22b7..ce79508ed 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -22,6 +22,7 @@ class Config public static $defaultConfig = array( 'process-timeout' => 300, 'use-include-path' => false, + 'prefer-source' => false, 'notify-on-install' => true, 'github-protocols' => array('git', 'https', 'http'), 'vendor-dir' => 'vendor',