From 8e8e9d3719eb81cbecb913b68efa321a535477ad Mon Sep 17 00:00:00 2001 From: Renan de Lima Date: Mon, 22 Jul 2013 10:42:48 -0300 Subject: [PATCH] Factory uses "prefered-install" configuration when creating DownloadManager --- src/Composer/Factory.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index c8e854e3e..645f93bf9 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -316,6 +316,19 @@ class Factory } $dm = new Downloader\DownloadManager(); + switch ($config->get('preferred-install')) { + case 'dist': + $dm->setPreferDist(true); + break; + case 'source': + $dm->setPreferSource(true); + break; + case 'auto': + default: + // noop + break; + } + $dm->setDownloader('git', new Downloader\GitDownloader($io, $config)); $dm->setDownloader('svn', new Downloader\SvnDownloader($io, $config)); $dm->setDownloader('hg', new Downloader\HgDownloader($io, $config));