1
0
Fork 0

Renaming some methods and props.

pull/6674/head
Matthew Grasmick 2017-09-11 12:38:54 -04:00
parent 2e4afaa941
commit 3826e51caa
5 changed files with 12 additions and 11 deletions

View File

@ -131,7 +131,7 @@ EOT
->setApcuAutoloader($apcu) ->setApcuAutoloader($apcu)
->setUpdate(true) ->setUpdate(true)
->setUpdateWhitelist($packages) ->setUpdateWhitelist($packages)
->setIndirectWhitelistDependencies(!$input->getOption('no-update-with-dependencies')) ->setWhitelistNonRootDependencies(!$input->getOption('no-update-with-dependencies'))
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs')) ->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
->setRunScripts(!$input->getOption('no-scripts')) ->setRunScripts(!$input->getOption('no-scripts'))
; ;

View File

@ -170,7 +170,7 @@ EOT
->setApcuAutoloader($apcu) ->setApcuAutoloader($apcu)
->setUpdate(true) ->setUpdate(true)
->setUpdateWhitelist(array_keys($requirements)) ->setUpdateWhitelist(array_keys($requirements))
->setIndirectWhitelistDependencies($input->getOption('update-with-dependencies')) ->setWhitelistNonRootDependencies($input->getOption('update-with-dependencies'))
->setAllWhitelistDependencies($input->getOption('update-with-all-dependencies')) ->setAllWhitelistDependencies($input->getOption('update-with-all-dependencies'))
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs')) ->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
->setPreferStable($input->getOption('prefer-stable')) ->setPreferStable($input->getOption('prefer-stable'))

View File

@ -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-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-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('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-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.'), 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('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('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`.'), 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) ->setApcuAutoloader($apcu)
->setUpdate(true) ->setUpdate(true)
->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $packages) ->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $packages)
->setIndirectWhitelistDependencies($input->getOption('with-dependencies')) ->setWhitelistNonRootDependencies($input->getOption('with-dependencies'))
->setAllWhitelistDependencies($input->getOption('with-all-dependencies')) ->setAllWhitelistDependencies($input->getOption('with-all-dependencies'))
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs')) ->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
->setPreferStable($input->getOption('prefer-stable')) ->setPreferStable($input->getOption('prefer-stable'))

View File

@ -125,7 +125,7 @@ class Installer
* @var array|null * @var array|null
*/ */
protected $updateWhitelist = null; protected $updateWhitelist = null;
protected $whitelistIndirectDependencies = false; protected $whitelistNonRootDependencies = false;
protected $whitelistAllDependencies = false; protected $whitelistAllDependencies = false;
/** /**
@ -1354,7 +1354,7 @@ class Installer
$seen[$package->getId()] = true; $seen[$package->getId()] = true;
$this->updateWhitelist[$package->getName()] = true; $this->updateWhitelist[$package->getName()] = true;
if (!$this->whitelistIndirectDependencies && !$this->whitelistAllDependencies) { if (!$this->whitelistNonRootDependencies && !$this->whitelistAllDependencies) {
continue; continue;
} }
@ -1660,12 +1660,13 @@ class Installer
* This will NOT whitelist any dependencies that are also directly defined * This will NOT whitelist any dependencies that are also directly defined
* in the root package. * in the root package.
* *
* @param bool $updateDependencies * @param bool $updateNonRootDependencies
*
* @return Installer * @return Installer
*/ */
public function setIndirectWhitelistDependencies($updateDependencies = true) public function setWhitelistNonRootDependencies($updateNonRootDependencies = true)
{ {
$this->whitelistIndirectDependencies = (bool) $updateDependencies; $this->whitelistNonRootDependencies = (bool) $updateNonRootDependencies;
return $this; return $this;
} }

View File

@ -224,7 +224,7 @@ class InstallerTest extends TestCase
->setUpdate(true) ->setUpdate(true)
->setDryRun($input->getOption('dry-run')) ->setDryRun($input->getOption('dry-run'))
->setUpdateWhitelist($input->getArgument('packages')) ->setUpdateWhitelist($input->getArgument('packages'))
->setIndirectWhitelistDependencies($input->getOption('with-dependencies')) ->setWhitelistNonRootDependencies($input->getOption('with-dependencies'))
->setAllWhitelistDependencies($input->getOption('with-all-dependencies')) ->setAllWhitelistDependencies($input->getOption('with-all-dependencies'))
->setPreferStable($input->getOption('prefer-stable')) ->setPreferStable($input->getOption('prefer-stable'))
->setPreferLowest($input->getOption('prefer-lowest')) ->setPreferLowest($input->getOption('prefer-lowest'))