Fix for #1966, use the preferred-install from the rootPackage config to install the dependencies.
parent
e8a3fc5c1c
commit
bc7c93ae85
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue