Skip to content

Commit

Permalink
Rename minimal-update to minimal-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Oct 25, 2023
1 parent 3f08ec6 commit 4bf34f4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions doc/03-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ php composer.phar update vendor/package:2.0.1 vendor/package2:3.0.*
* **--prefer-lowest:** Prefer lowest versions of dependencies. Useful for testing minimal
versions of requirements, generally used with `--prefer-stable`. Can also be set via the
COMPOSER_PREFER_LOWEST=1 env var.
* **--minimal-update:** During a partial update with `-w`/`-W`, only perform absolutely necessary
updates of transitive dependencies. Can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var.
* **--minimal-changes:** During a partial update with `-w`/`-W`, only perform absolutely necessary
changes to transitive dependencies. Can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var.
* **--interactive:** Interactive interface with autocompletion to select the packages to update.
* **--root-reqs:** Restricts the update to your first degree dependencies.

Expand Down Expand Up @@ -290,8 +290,8 @@ If you do not specify a package, Composer will prompt you to search for a packag
* **--prefer-lowest:** Prefer lowest versions of dependencies. Useful for testing minimal
versions of requirements, generally used with `--prefer-stable`. Can also be set via the
COMPOSER_PREFER_LOWEST=1 env var.
* **--minimal-update:** During an update with `-w`/`-W`, only perform absolutely necessary
updates of transitive dependencies. Can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var.
* **--minimal-changes:** During an update with `-w`/`-W`, only perform absolutely necessary
changes to transitive dependencies. Can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var.
* **--sort-packages:** Keep packages sorted in `composer.json`.
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to
get a faster autoloader. This is recommended especially for production, but
Expand Down Expand Up @@ -330,8 +330,8 @@ uninstalled.
(Deprecated, is now default behavior)
* **--update-with-all-dependencies (-W):** Allows all inherited dependencies to be updated,
including those that are root requirements.
* **--minimal-update:** During an update with `-w`/`-W`, only perform absolutely necessary
updates of transitive dependencies. Can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var.
* **--minimal-changes:** During an update with `-w`/`-W`, only perform absolutely necessary
changes to transitive dependencies. Can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var.
* **--ignore-platform-reqs:** ignore all platform requirements (`php`, `hhvm`,
`lib-*` and `ext-*`) and force the installation even if the local machine does
not fulfill these.
Expand Down Expand Up @@ -1296,9 +1296,9 @@ If set to `1`, it is the equivalent of passing the `--prefer-stable` option to
If set to `1`, it is the equivalent of passing the `--prefer-lowest` option to
`update` or `require`.

### COMPOSER_MINIMAL_UPDATE
### COMPOSER_MINIMAL_CHANGES

If set to `1`, it is the equivalent of passing the `--minimal-update` option to
If set to `1`, it is the equivalent of passing the `--minimal-changes` option to
`update`, `require` or `remove`.

### COMPOSER_IGNORE_PLATFORM_REQ or COMPOSER_IGNORE_PLATFORM_REQS
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/Command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected function initialize(InputInterface $input, OutputInterface $output)
'COMPOSER_NO_DEV' => ['no-dev', 'update-no-dev'],
'COMPOSER_PREFER_STABLE' => ['prefer-stable'],
'COMPOSER_PREFER_LOWEST' => ['prefer-lowest'],
'COMPOSER_MINIMAL_UPDATE' => ['minimal-update'],
'COMPOSER_MINIMAL_CHANGES' => ['minimal-changes'],
];
foreach ($envOptions as $envName => $optionNames) {
foreach ($optionNames as $optionName) {
Expand Down
4 changes: 2 additions & 2 deletions src/Composer/Command/RemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function configure()
new InputOption('update-with-all-dependencies', 'W', InputOption::VALUE_NONE, 'Allows all inherited dependencies to be updated, including those that are root requirements.'),
new InputOption('with-all-dependencies', null, InputOption::VALUE_NONE, 'Alias for --update-with-all-dependencies'),
new InputOption('no-update-with-dependencies', null, InputOption::VALUE_NONE, 'Does not allow inherited dependencies to be updated with explicit dependencies.'),
new InputOption('minimal-update', 'm', InputOption::VALUE_NONE, 'During an update with -w/-W, only perform absolutely necessary updates of transitive dependencies (can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var).'),
new InputOption('minimal-changes', 'm', InputOption::VALUE_NONE, 'During an update with -w/-W, only perform absolutely necessary changes to transitive dependencies (can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var).'),
new InputOption('unused', null, InputOption::VALUE_NONE, 'Remove all packages which are locked but not required by any other package.'),
new InputOption('ignore-platform-req', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Ignore a specific platform requirement (php & ext- packages).'),
new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore all platform requirements (php & ext- packages).'),
Expand Down Expand Up @@ -287,7 +287,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->setDryRun($dryRun)
->setAudit(!$input->getOption('no-audit'))
->setAuditFormat($this->getAuditFormat($input))
->setMinimalUpdate($input->getOption('minimal-update'))
->setMinimalUpdate($input->getOption('minimal-changes'))
;

// if no lock is present, we do not do a partial update as
Expand Down
4 changes: 2 additions & 2 deletions src/Composer/Command/RequireCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function configure()
new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore all platform requirements (php & ext- packages).'),
new InputOption('prefer-stable', null, InputOption::VALUE_NONE, 'Prefer stable versions of dependencies (can also be set via the COMPOSER_PREFER_STABLE=1 env var).'),
new InputOption('prefer-lowest', null, InputOption::VALUE_NONE, 'Prefer lowest versions of dependencies (can also be set via the COMPOSER_PREFER_LOWEST=1 env var).'),
new InputOption('minimal-update', 'm', InputOption::VALUE_NONE, 'During an update with -w/-W, only perform absolutely necessary updates of transitive dependencies (can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var).'),
new InputOption('minimal-changes', 'm', InputOption::VALUE_NONE, 'During an update with -w/-W, only perform absolutely necessary changes to transitive dependencies (can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var).'),
new InputOption('sort-packages', null, InputOption::VALUE_NONE, 'Sorts packages when adding/updating a new dependency'),
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`.'),
Expand Down Expand Up @@ -480,7 +480,7 @@ private function doUpdate(InputInterface $input, OutputInterface $output, IOInte
->setPreferLowest($input->getOption('prefer-lowest'))
->setAudit(!$input->getOption('no-audit'))
->setAuditFormat($this->getAuditFormat($input))
->setMinimalUpdate($input->getOption('minimal-update'))
->setMinimalUpdate($input->getOption('minimal-changes'))
;

// if no lock is present, or the file is brand new, we do not do a
Expand Down
4 changes: 2 additions & 2 deletions src/Composer/Command/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function configure()
new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore all platform requirements (php & ext- packages).'),
new InputOption('prefer-stable', null, InputOption::VALUE_NONE, 'Prefer stable versions of dependencies (can also be set via the COMPOSER_PREFER_STABLE=1 env var).'),
new InputOption('prefer-lowest', null, InputOption::VALUE_NONE, 'Prefer lowest versions of dependencies (can also be set via the COMPOSER_PREFER_LOWEST=1 env var).'),
new InputOption('minimal-update', 'm', InputOption::VALUE_NONE, 'During a partial update with -w/-W, only perform absolutely necessary updates of transitive dependencies (can also be set via the COMPOSER_MINIMAL_UPDATE=1 env var).'),
new InputOption('minimal-changes', 'm', InputOption::VALUE_NONE, 'During a partial update with -w/-W, only perform absolutely necessary changes to transitive dependencies (can also be set via the COMPOSER_MINIMAL_CHANGES=1 env var).'),
new InputOption('interactive', 'i', InputOption::VALUE_NONE, 'Interactive interface with autocompletion to select the packages to update.'),
new InputOption('root-reqs', null, InputOption::VALUE_NONE, 'Restricts the update to your first degree dependencies.'),
])
Expand Down Expand Up @@ -239,7 +239,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->setTemporaryConstraints($temporaryConstraints)
->setAudit(!$input->getOption('no-audit'))
->setAuditFormat($this->getAuditFormat($input))
->setMinimalUpdate($input->getOption('minimal-update'))
->setMinimalUpdate($input->getOption('minimal-changes'))
;

if ($input->getOption('no-plugins')) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Composer/Test/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private function doTestIntegration(string $file, string $message, ?string $condi
$update->addOption('lock', null, InputOption::VALUE_NONE);
$update->addOption('with-all-dependencies', null, InputOption::VALUE_NONE);
$update->addOption('with-dependencies', null, InputOption::VALUE_NONE);
$update->addOption('minimal-update', null, InputOption::VALUE_NONE);
$update->addOption('minimal-changes', null, InputOption::VALUE_NONE);
$update->addOption('prefer-stable', null, InputOption::VALUE_NONE);
$update->addOption('prefer-lowest', null, InputOption::VALUE_NONE);
$update->addArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL);
Expand Down Expand Up @@ -414,7 +414,7 @@ private function doTestIntegration(string $file, string $message, ?string $condi
->setPreferLowest($input->getOption('prefer-lowest'))
->setPlatformRequirementFilter(PlatformRequirementFilterFactory::fromBoolOrList($ignorePlatformReqs))
->setAudit(false)
->setMinimalUpdate($input->getOption('minimal-update'));
->setMinimalUpdate($input->getOption('minimal-changes'));

return $installer->run();
});
Expand Down

0 comments on commit 4bf34f4

Please sign in to comment.