Make create-project install dependencies following optimize-autoloader config setting, fixes #6722
parent
b0922b95af
commit
0de1e21233
|
@ -169,7 +169,9 @@ EOT
|
|||
$composer->getEventDispatcher()->dispatchScript(ScriptEvents::POST_ROOT_PACKAGE_INSTALL, $installDevPackages);
|
||||
}
|
||||
|
||||
list($preferSource, $preferDist) = $this->getPreferredInstallOptions($composer->getConfig(), $input);
|
||||
// use the new config including the newly installed project
|
||||
$config = $composer->getConfig();
|
||||
list($preferSource, $preferDist) = $this->getPreferredInstallOptions($config, $input);
|
||||
|
||||
// install dependencies of the created project
|
||||
if ($noInstall === false) {
|
||||
|
@ -179,7 +181,8 @@ EOT
|
|||
->setDevMode($installDevPackages)
|
||||
->setRunScripts(!$noScripts)
|
||||
->setIgnorePlatformRequirements($ignorePlatformReqs)
|
||||
->setSuggestedPackagesReporter($this->suggestedPackagesReporter);
|
||||
->setSuggestedPackagesReporter($this->suggestedPackagesReporter)
|
||||
->setOptimizeAutoloader($config->get('optimize-autoloader'));
|
||||
|
||||
if ($disablePlugins) {
|
||||
$installer->disablePlugins();
|
||||
|
@ -238,10 +241,10 @@ EOT
|
|||
}
|
||||
|
||||
chdir($oldCwd);
|
||||
$vendorComposerDir = $composer->getConfig()->get('vendor-dir').'/composer';
|
||||
$vendorComposerDir = $config->get('vendor-dir').'/composer';
|
||||
if (is_dir($vendorComposerDir) && $fs->isDirEmpty($vendorComposerDir)) {
|
||||
Silencer::call('rmdir', $vendorComposerDir);
|
||||
$vendorDir = $composer->getConfig()->get('vendor-dir');
|
||||
$vendorDir = $config->get('vendor-dir');
|
||||
if (is_dir($vendorDir) && $fs->isDirEmpty($vendorDir)) {
|
||||
Silencer::call('rmdir', $vendorDir);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue