use optimize-autoloader config param in update and install commands
parent
8a221854b1
commit
5e5311a224
|
@ -76,7 +76,10 @@ EOT
|
|||
|
||||
$preferSource = false;
|
||||
$preferDist = false;
|
||||
switch ($composer->getConfig()->get('preferred-install')) {
|
||||
|
||||
$config = $composer->getConfig();
|
||||
|
||||
switch ($config->get('preferred-install')) {
|
||||
case 'source':
|
||||
$preferSource = true;
|
||||
break;
|
||||
|
@ -93,6 +96,8 @@ EOT
|
|||
$preferDist = $input->getOption('prefer-dist');
|
||||
}
|
||||
|
||||
$optimize = $input->getOption('optimize-autoloader') || $config->get('optimize-autoloader');
|
||||
|
||||
$install
|
||||
->setDryRun($input->getOption('dry-run'))
|
||||
->setVerbose($input->getOption('verbose'))
|
||||
|
@ -100,7 +105,7 @@ EOT
|
|||
->setPreferDist($preferDist)
|
||||
->setDevMode(!$input->getOption('no-dev'))
|
||||
->setRunScripts(!$input->getOption('no-scripts'))
|
||||
->setOptimizeAutoloader($input->getOption('optimize-autoloader'))
|
||||
->setOptimizeAutoloader($optimize)
|
||||
;
|
||||
|
||||
if ($input->getOption('no-plugins')) {
|
||||
|
|
|
@ -81,7 +81,10 @@ EOT
|
|||
|
||||
$preferSource = false;
|
||||
$preferDist = false;
|
||||
switch ($composer->getConfig()->get('preferred-install')) {
|
||||
|
||||
$config = $composer->getConfig();
|
||||
|
||||
switch ($config->get('preferred-install')) {
|
||||
case 'source':
|
||||
$preferSource = true;
|
||||
break;
|
||||
|
@ -98,6 +101,8 @@ EOT
|
|||
$preferDist = $input->getOption('prefer-dist');
|
||||
}
|
||||
|
||||
$optimize = $input->getOption('optimize-autoloader') || $config->get('optimize-autoloader');
|
||||
|
||||
$install
|
||||
->setDryRun($input->getOption('dry-run'))
|
||||
->setVerbose($input->getOption('verbose'))
|
||||
|
@ -105,7 +110,7 @@ EOT
|
|||
->setPreferDist($preferDist)
|
||||
->setDevMode(!$input->getOption('no-dev'))
|
||||
->setRunScripts(!$input->getOption('no-scripts'))
|
||||
->setOptimizeAutoloader($input->getOption('optimize-autoloader'))
|
||||
->setOptimizeAutoloader($optimize)
|
||||
->setUpdate(true)
|
||||
->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $input->getArgument('packages'))
|
||||
->setWhitelistDependencies($input->getOption('with-dependencies'))
|
||||
|
|
|
@ -279,7 +279,12 @@ class Installer
|
|||
}
|
||||
|
||||
// write autoloader
|
||||
if ($this->optimizeAutoloader) {
|
||||
$this->io->write('<info>Generating optimized autoload files</info>');
|
||||
} else {
|
||||
$this->io->write('<info>Generating autoload files</info>');
|
||||
}
|
||||
|
||||
$this->autoloadGenerator->dump($this->config, $localRepo, $this->package, $this->installationManager, 'composer', $this->optimizeAutoloader);
|
||||
|
||||
if ($this->runScripts) {
|
||||
|
|
Loading…
Reference in New Issue