composer/composer — pull request #2414 by matthieuauger (2013-11-11 17:01:24+00:00)
Title: If installer sets prefer to false, the manager should too. Fixes #2359

Hi,

The installer should force the prefer options of the download manager, even if it false.

Otherwise, if we have preferred-install = source in config, and prefer-dist option given to Install Command, this happens :
- The install command instanciates composer, uses config and set downloadManager->preferSource = true
- Then install command reads CLI options, and set installer->preferSource = false, installer->preferDist = true which is fine
- When install->run() is executed, the downloadManager->preferSource (actually true due to config) is not overriden, because we override it only if the value is true.

The result : We have both downloadManager->preferSource = true and downloadManager->preferDist = true, and preferSource takes priority.

Fixes #2359