From 73a5cc63cc631fe66fa1f532cf5965c2879aff3a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 12 Mar 2020 08:12:12 +0100 Subject: [PATCH] Always use Removing for consistency between dry-run and actual install --- .../DependencyResolver/Operation/UninstallOperation.php | 2 +- .../Fixtures/installer/install-from-lock-removes-package.test | 2 +- .../Fixtures/installer/update-no-dev-still-resolves-dev.test | 2 +- .../Fixtures/installer/update-removes-unused-locked-dep.test | 4 ++-- .../Test/Fixtures/installer/update-to-empty-from-locked.test | 2 +- .../Fixtures/installer/update-whitelist-removes-unused.test | 2 +- .../installer/updating-dev-from-lock-removes-old-deps.test | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Composer/DependencyResolver/Operation/UninstallOperation.php b/src/Composer/DependencyResolver/Operation/UninstallOperation.php index b825796ed..2ddc2f169 100644 --- a/src/Composer/DependencyResolver/Operation/UninstallOperation.php +++ b/src/Composer/DependencyResolver/Operation/UninstallOperation.php @@ -61,7 +61,7 @@ class UninstallOperation extends SolverOperation */ public function show($lock) { - return ($lock ? 'Removing ' : 'Uninstalling ').$this->package->getPrettyName().' ('.$this->package->getFullPrettyVersion().')'; + return 'Removing '.$this->package->getPrettyName().' ('.$this->package->getFullPrettyVersion().')'; } /** diff --git a/tests/Composer/Test/Fixtures/installer/install-from-lock-removes-package.test b/tests/Composer/Test/Fixtures/installer/install-from-lock-removes-package.test index b1677956c..b996ff65b 100644 --- a/tests/Composer/Test/Fixtures/installer/install-from-lock-removes-package.test +++ b/tests/Composer/Test/Fixtures/installer/install-from-lock-removes-package.test @@ -40,5 +40,5 @@ Install from a lock file that deleted a package --RUN-- install --EXPECT-- -Uninstalling old/dependency (1.0.0) +Removing old/dependency (1.0.0) Upgrading whitelisted/pkg (1.0.0 => 1.1.0) diff --git a/tests/Composer/Test/Fixtures/installer/update-no-dev-still-resolves-dev.test b/tests/Composer/Test/Fixtures/installer/update-no-dev-still-resolves-dev.test index f0c8282a1..06cbc27c7 100644 --- a/tests/Composer/Test/Fixtures/installer/update-no-dev-still-resolves-dev.test +++ b/tests/Composer/Test/Fixtures/installer/update-no-dev-still-resolves-dev.test @@ -60,7 +60,7 @@ Updates with --no-dev but we still end up with a complete lock file including de --RUN-- update --no-dev --EXPECT-- -Uninstalling a/b (1.0.0) +Removing a/b (1.0.0) Upgrading a/a (1.0.0 => 1.0.1) Installing a/c (1.0.0) Upgrading dev/pkg (dev-master old => dev-master new) diff --git a/tests/Composer/Test/Fixtures/installer/update-removes-unused-locked-dep.test b/tests/Composer/Test/Fixtures/installer/update-removes-unused-locked-dep.test index 2b377506d..a47afb7ff 100644 --- a/tests/Composer/Test/Fixtures/installer/update-removes-unused-locked-dep.test +++ b/tests/Composer/Test/Fixtures/installer/update-removes-unused-locked-dep.test @@ -63,5 +63,5 @@ Package operations: 0 installs, 0 updates, 2 removals Generating autoload files --EXPECT-- -Uninstalling c/c (1.0.0) -Uninstalling b/b (1.0.0) +Removing c/c (1.0.0) +Removing b/b (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/update-to-empty-from-locked.test b/tests/Composer/Test/Fixtures/installer/update-to-empty-from-locked.test index f8bf6010f..89e94d781 100644 --- a/tests/Composer/Test/Fixtures/installer/update-to-empty-from-locked.test +++ b/tests/Composer/Test/Fixtures/installer/update-to-empty-from-locked.test @@ -44,5 +44,5 @@ update "platform-dev": [] } --EXPECT-- -Uninstalling a/a (dev-master 1234) +Removing a/a (dev-master 1234) Marking a/a (9999999-dev 1234) as uninstalled, alias of a/a (dev-master 1234) diff --git a/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test b/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test index 0863d1321..9360bc2f6 100644 --- a/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test +++ b/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test @@ -44,5 +44,5 @@ Update with a package whitelist removes unused packages --RUN-- update --with-dependencies whitelisted/pkg --EXPECT-- -Uninstalling old/dependency (1.0.0) +Removing old/dependency (1.0.0) Upgrading whitelisted/pkg (1.0.0 => 1.1.0) diff --git a/tests/Composer/Test/Fixtures/installer/updating-dev-from-lock-removes-old-deps.test b/tests/Composer/Test/Fixtures/installer/updating-dev-from-lock-removes-old-deps.test index 68ab1fa1a..3fb6654ab 100644 --- a/tests/Composer/Test/Fixtures/installer/updating-dev-from-lock-removes-old-deps.test +++ b/tests/Composer/Test/Fixtures/installer/updating-dev-from-lock-removes-old-deps.test @@ -41,6 +41,6 @@ Installing locked dev packages should remove old dependencies --RUN-- install --EXPECT-- -Uninstalling a/dependency (dev-master ref) +Removing a/dependency (dev-master ref) Upgrading a/devpackage (dev-master oldref => dev-master newref) Marking a/dependency (9999999-dev ref) as uninstalled, alias of a/dependency (dev-master ref)