From 99a5469b5e3d956d3b7e014147186bbd3678276e Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 18 Oct 2020 13:13:44 +0200 Subject: [PATCH] More hints --- src/Composer/Command/DiagnoseCommand.php | 2 +- src/Composer/DependencyResolver/PoolBuilder.php | 4 ++-- src/Composer/DependencyResolver/SolverProblemsException.php | 2 +- .../Test/Fixtures/installer/alias-solver-problems2.test | 2 +- .../Composer/Test/Fixtures/installer/github-issues-4795.test | 2 +- .../partial-update-downgrades-non-allow-listed-unstable.test | 2 +- .../Test/Fixtures/installer/problems-reduce-versions.test | 2 +- tests/Composer/Test/Fixtures/installer/solver-problems.test | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 564cd843a..9923d872a 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -456,7 +456,7 @@ EOT 'ssl '.(isset($version['ssl_version']) ? $version['ssl_version'] : 'missing').''; } - return 'missing, using php streams fallback'; + return 'missing, using php streams fallback, which reduces performance'; } /** diff --git a/src/Composer/DependencyResolver/PoolBuilder.php b/src/Composer/DependencyResolver/PoolBuilder.php index 83c0ca08f..ccd3e9dde 100644 --- a/src/Composer/DependencyResolver/PoolBuilder.php +++ b/src/Composer/DependencyResolver/PoolBuilder.php @@ -380,7 +380,7 @@ class PoolBuilder $this->markPackageNameForLoading($request, $require, $linkConstraint); } elseif (!$request->getUpdateAllowTransitiveRootDependencies() && $this->isRootRequire($request, $require) && !isset($this->updateAllowWarned[$require])) { $this->updateAllowWarned[$require] = true; - $this->io->writeError('Dependency "'.$require.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies.'); + $this->io->writeError('Dependency "'.$require.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.'); } } else { $this->markPackageNameForLoading($request, $require, $linkConstraint); @@ -405,7 +405,7 @@ class PoolBuilder $this->markPackageNameForLoading($request, $replace, $link->getConstraint()); } elseif (!$request->getUpdateAllowTransitiveRootDependencies() && $this->isRootRequire($request, $replace) && !isset($this->updateAllowWarned[$replace])) { $this->updateAllowWarned[$replace] = true; - $this->io->writeError('Dependency "'.$replace.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies.'); + $this->io->writeError('Dependency "'.$replace.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.'); } } } diff --git a/src/Composer/DependencyResolver/SolverProblemsException.php b/src/Composer/DependencyResolver/SolverProblemsException.php index ab3e2aa40..85998e5a0 100644 --- a/src/Composer/DependencyResolver/SolverProblemsException.php +++ b/src/Composer/DependencyResolver/SolverProblemsException.php @@ -64,7 +64,7 @@ class SolverProblemsException extends \RuntimeException } if ($isCausedByLock && !$isDevExtraction) { - $hints[] = "Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions."; + $hints[] = "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions."; } if (strpos($text, 'found composer-plugin-api[2.0.0] but it does not match') && strpos($text, '- ocramius/package-versions')) { diff --git a/tests/Composer/Test/Fixtures/installer/alias-solver-problems2.test b/tests/Composer/Test/Fixtures/installer/alias-solver-problems2.test index df9634689..8f21a285a 100644 --- a/tests/Composer/Test/Fixtures/installer/alias-solver-problems2.test +++ b/tests/Composer/Test/Fixtures/installer/alias-solver-problems2.test @@ -46,6 +46,6 @@ Your requirements could not be resolved to an installable set of packages. - locked/pkg dev-master requires locked/dependency 1.0.0 -> found locked/dependency[1.0.0] in lock file but not in remote repositories, make sure you avoid updating this package to keep the one from lock file. - locked/pkg is locked to version dev-master and an update of this package was not requested. -Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions. +Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. --EXPECT-- diff --git a/tests/Composer/Test/Fixtures/installer/github-issues-4795.test b/tests/Composer/Test/Fixtures/installer/github-issues-4795.test index 39803f725..f526e4220 100644 --- a/tests/Composer/Test/Fixtures/installer/github-issues-4795.test +++ b/tests/Composer/Test/Fixtures/installer/github-issues-4795.test @@ -51,7 +51,7 @@ update b/b --with-dependencies --EXPECT-OUTPUT-- Loading composer repositories with package information Updating dependencies -Dependency "a/a" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies. +Dependency "a/a" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Nothing to modify in lock file Writing lock file Installing dependencies from lock file (including require-dev) diff --git a/tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-allow-listed-unstable.test b/tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-allow-listed-unstable.test index b1298ad6e..2ad9ea3f6 100644 --- a/tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-allow-listed-unstable.test +++ b/tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-allow-listed-unstable.test @@ -61,4 +61,4 @@ Your requirements could not be resolved to an installable set of packages. Problem 1 - b/unstable is fixed to 1.1.0-alpha (lock file version) by a partial update but that version is rejected by your minimum-stability. Make sure you list it as an argument for the update command. -Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions. +Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. diff --git a/tests/Composer/Test/Fixtures/installer/problems-reduce-versions.test b/tests/Composer/Test/Fixtures/installer/problems-reduce-versions.test index aa16b8acd..377c6a742 100644 --- a/tests/Composer/Test/Fixtures/installer/problems-reduce-versions.test +++ b/tests/Composer/Test/Fixtures/installer/problems-reduce-versions.test @@ -112,7 +112,7 @@ Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires b/b ^1.1 || ^2.0 || ^3.0, found b/b[1.1.0, ..., 1.2.9, 2.0.0, ..., 2.3.0-RC, 3.0.0, 3.0.1, 3.0.2, 3.0.3] but the package is fixed to 1.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. -Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions. +Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. --EXPECT-- diff --git a/tests/Composer/Test/Fixtures/installer/solver-problems.test b/tests/Composer/Test/Fixtures/installer/solver-problems.test index 9ba5867a1..83160893b 100644 --- a/tests/Composer/Test/Fixtures/installer/solver-problems.test +++ b/tests/Composer/Test/Fixtures/installer/solver-problems.test @@ -164,7 +164,7 @@ To enable extensions, verify that they are enabled in your .ini files: __inilist__ You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. -Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions. +Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. --EXPECT--