Browse Source

Use Upgrading for package installs too

Jordi Boggiano 5 years ago
parent
commit
7e142b5d6b

+ 1 - 1
src/Composer/Downloader/FileDownloader.php

@@ -271,7 +271,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
         $from = $initial->getFullPrettyVersion();
         $to = $target->getFullPrettyVersion();
 
-        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Updating' : 'Downgrading';
+        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Upgrading' : 'Downgrading';
         $this->io->writeError("  - " . $actionName . " <info>" . $name . "</info> (<comment>" . $from . "</comment> => <comment>" . $to . "</comment>): ", false);
 
         $this->remove($initial, $path, false);

+ 1 - 1
src/Composer/Downloader/VcsDownloader.php

@@ -165,7 +165,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
             $to = $target->getFullPrettyVersion();
         }
 
-        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Updating' : 'Downgrading';
+        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Upgrading' : 'Downgrading';
         $this->io->writeError("  - " . $actionName . " <info>" . $name . "</info> (<comment>" . $from . "</comment> => <comment>" . $to . "</comment>): ", false);
 
         $urls = $this->prepareUrls($target->getSourceUrls());

+ 1 - 1
src/Composer/Installer/MetapackageInstaller.php

@@ -93,7 +93,7 @@ class MetapackageInstaller implements InstallerInterface
         $name = $target->getName();
         $from = $initial->getFullPrettyVersion();
         $to = $target->getFullPrettyVersion();
-        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Updating' : 'Downgrading';
+        $actionName = VersionParser::isUpgrade($initial->getVersion(), $target->getVersion()) ? 'Upgrading' : 'Downgrading';
         $this->io->writeError("  - " . $actionName . " <info>" . $name . "</info> (<comment>" . $from . "</comment> => <comment>" . $to . "</comment>)");
 
         $repo->removePackage($initial);

+ 1 - 1
tests/Composer/Test/Downloader/GitDownloaderTest.php

@@ -691,7 +691,7 @@ composer https://github.com/old/url (push)
         $ioMock = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
         $ioMock->expects($this->at(0))
             ->method('writeError')
-            ->with($this->stringContains('Updating'));
+            ->with($this->stringContains('Upgrading'));
 
         $this->fs->ensureDirectoryExists($this->workingDir.'/.git');
         $downloader = $this->getDownloaderMock($ioMock, null, $processExecutor);