Renaming some methods and props.
parent
2e4afaa941
commit
3826e51caa
|
@ -131,7 +131,7 @@ EOT
|
|||
->setApcuAutoloader($apcu)
|
||||
->setUpdate(true)
|
||||
->setUpdateWhitelist($packages)
|
||||
->setIndirectWhitelistDependencies(!$input->getOption('no-update-with-dependencies'))
|
||||
->setWhitelistNonRootDependencies(!$input->getOption('no-update-with-dependencies'))
|
||||
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
|
||||
->setRunScripts(!$input->getOption('no-scripts'))
|
||||
;
|
||||
|
|
|
@ -170,7 +170,7 @@ EOT
|
|||
->setApcuAutoloader($apcu)
|
||||
->setUpdate(true)
|
||||
->setUpdateWhitelist(array_keys($requirements))
|
||||
->setIndirectWhitelistDependencies($input->getOption('update-with-dependencies'))
|
||||
->setWhitelistNonRootDependencies($input->getOption('update-with-dependencies'))
|
||||
->setAllWhitelistDependencies($input->getOption('update-with-all-dependencies'))
|
||||
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
|
||||
->setPreferStable($input->getOption('prefer-stable'))
|
||||
|
|
|
@ -48,8 +48,8 @@ class UpdateCommand extends BaseCommand
|
|||
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('with-dependencies', null, InputOption::VALUE_NONE, 'Add also dependencies of whitelisted packages to the whitelist, if those dependencies are not defined in root package.'),
|
||||
new InputOption('with-all-dependencies', null, InputOption::VALUE_NONE, 'Add also all dependencies of whitelisted packages to the whitelist.'),
|
||||
new InputOption('with-dependencies', null, InputOption::VALUE_NONE, 'Add also dependencies of whitelisted packages to the whitelist, except those defined in root package.'),
|
||||
new InputOption('with-all-dependencies', null, InputOption::VALUE_NONE, 'Add also all dependencies of whitelisted packages to the whitelist, including those defined in root package.'),
|
||||
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`.'),
|
||||
|
@ -146,7 +146,7 @@ EOT
|
|||
->setApcuAutoloader($apcu)
|
||||
->setUpdate(true)
|
||||
->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $packages)
|
||||
->setIndirectWhitelistDependencies($input->getOption('with-dependencies'))
|
||||
->setWhitelistNonRootDependencies($input->getOption('with-dependencies'))
|
||||
->setAllWhitelistDependencies($input->getOption('with-all-dependencies'))
|
||||
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
|
||||
->setPreferStable($input->getOption('prefer-stable'))
|
||||
|
|
|
@ -125,7 +125,7 @@ class Installer
|
|||
* @var array|null
|
||||
*/
|
||||
protected $updateWhitelist = null;
|
||||
protected $whitelistIndirectDependencies = false;
|
||||
protected $whitelistNonRootDependencies = false;
|
||||
protected $whitelistAllDependencies = false;
|
||||
|
||||
/**
|
||||
|
@ -1354,7 +1354,7 @@ class Installer
|
|||
$seen[$package->getId()] = true;
|
||||
$this->updateWhitelist[$package->getName()] = true;
|
||||
|
||||
if (!$this->whitelistIndirectDependencies && !$this->whitelistAllDependencies) {
|
||||
if (!$this->whitelistNonRootDependencies && !$this->whitelistAllDependencies) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1660,12 +1660,13 @@ class Installer
|
|||
* This will NOT whitelist any dependencies that are also directly defined
|
||||
* in the root package.
|
||||
*
|
||||
* @param bool $updateDependencies
|
||||
* @param bool $updateNonRootDependencies
|
||||
*
|
||||
* @return Installer
|
||||
*/
|
||||
public function setIndirectWhitelistDependencies($updateDependencies = true)
|
||||
public function setWhitelistNonRootDependencies($updateNonRootDependencies = true)
|
||||
{
|
||||
$this->whitelistIndirectDependencies = (bool) $updateDependencies;
|
||||
$this->whitelistNonRootDependencies = (bool) $updateNonRootDependencies;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ class InstallerTest extends TestCase
|
|||
->setUpdate(true)
|
||||
->setDryRun($input->getOption('dry-run'))
|
||||
->setUpdateWhitelist($input->getArgument('packages'))
|
||||
->setIndirectWhitelistDependencies($input->getOption('with-dependencies'))
|
||||
->setWhitelistNonRootDependencies($input->getOption('with-dependencies'))
|
||||
->setAllWhitelistDependencies($input->getOption('with-all-dependencies'))
|
||||
->setPreferStable($input->getOption('prefer-stable'))
|
||||
->setPreferLowest($input->getOption('prefer-lowest'))
|
||||
|
|
Loading…
Reference in New Issue