1
0
Fork 0

Fix for #1966, use the preferred-install from the rootPackage config to install the dependencies.

pull/2751/head
Sandy Pleyte 2014-02-24 13:34:50 +01:00
parent e8a3fc5c1c
commit bc7c93ae85
1 changed files with 18 additions and 0 deletions

View File

@ -161,6 +161,24 @@ EOT
$composer->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_ROOT_PACKAGE_INSTALL, $installDevPackages); $composer->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_ROOT_PACKAGE_INSTALL, $installDevPackages);
} }
// Update preferSource / preferDist with preferred-install from the root package if both vars still
// have their default initial value (false)
$config = $composer->getConfig();
if ($config->has('preferred-install') && $preferDist === false && $preferSource === false) {
switch ($config->get('preferred-install')) {
case 'source':
$preferSource = true;
break;
case 'dist':
$preferDist = true;
break;
case 'auto':
default:
// noop
break;
}
}
// install dependencies of the created project // install dependencies of the created project
if ($noInstall === false) { if ($noInstall === false) {
$installer = Installer::create($io, $composer); $installer = Installer::create($io, $composer);