Adds flag to allow suggestions to be skipped
parent
b81210d9f8
commit
cbfd81dc99
|
@ -43,6 +43,7 @@ class InstallCommand extends BaseCommand
|
|||
new InputOption('no-autoloader', null, InputOption::VALUE_NONE, 'Skips autoloader generation'),
|
||||
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Skips the execution of all scripts defined in composer.json file.'),
|
||||
new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
|
||||
new InputOption('no-suggest', null, InputOption::VALUE_NONE, 'Do not show package suggestions.'),
|
||||
new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Shows more details including new commits pulled in when updating packages.'),
|
||||
new InputOption('optimize-autoloader', 'o', InputOption::VALUE_NONE, 'Optimize autoloader during autoloader dump'),
|
||||
new InputOption('classmap-authoritative', 'a', InputOption::VALUE_NONE, 'Autoload classes from the classmap only. Implicitly enables `--optimize-autoloader`.'),
|
||||
|
@ -121,6 +122,7 @@ EOT
|
|||
->setDevMode(!$input->getOption('no-dev'))
|
||||
->setDumpAutoloader(!$input->getOption('no-autoloader'))
|
||||
->setRunScripts(!$input->getOption('no-scripts'))
|
||||
->setSkipSuggest($input->getOption('no-suggest'))
|
||||
->setOptimizeAutoloader($optimize)
|
||||
->setClassMapAuthoritative($authoritative)
|
||||
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
|
||||
|
|
|
@ -114,6 +114,7 @@ class Installer
|
|||
protected $ignorePlatformReqs = false;
|
||||
protected $preferStable = false;
|
||||
protected $preferLowest = false;
|
||||
protected $skipSuggest = false;
|
||||
/**
|
||||
* Array of package names/globs flagged for update
|
||||
*
|
||||
|
@ -228,7 +229,7 @@ class Installer
|
|||
}
|
||||
|
||||
// output suggestions if we're in dev mode
|
||||
if ($this->devMode) {
|
||||
if ($this->devMode && !$this->skipSuggest) {
|
||||
$this->suggestedPackagesReporter->output($installedRepo);
|
||||
}
|
||||
|
||||
|
@ -1600,6 +1601,19 @@ class Installer
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should suggestions be skipped?
|
||||
*
|
||||
* @param bool $skipSuggest
|
||||
* @return Installer
|
||||
*/
|
||||
public function setSkipSuggest($skipSuggest = false)
|
||||
{
|
||||
$this->skipSuggest = (boolean) $skipSuggest;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables plugins.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue