Jordi Boggiano 5 лет назад
Родитель
Сommit
096b507050

+ 10 - 0
CHANGELOG.md

@@ -20,6 +20,14 @@
   * Fixed suggest output being very spammy, it now is only one line long and shows more rarely
   * Fixed conflict rules like e.g. >=5 from matching dev-master, as it is not normalized to 9999999-dev internally anymore
 
+### [1.10.4] 2020-04-09
+
+  * Fixed 1.10.2 regression in path symlinking with absolute path repos
+
+### [1.10.3] 2020-04-09
+
+  * Fixed invalid --2 flag warning in `self-update` when no channel is requested
+
 ### [1.10.2] 2020-04-09
 
   * Added --1 flag to `self-update` command which can be added to automated self-update runs to make sure it won't automatically jump to 2.0 once that is released
@@ -855,6 +863,8 @@
 
   * Initial release
 
+[1.10.4]: https://github.com/composer/composer/compare/1.10.3...1.10.4
+[1.10.3]: https://github.com/composer/composer/compare/1.10.2...1.10.3
 [1.10.2]: https://github.com/composer/composer/compare/1.10.1...1.10.2
 [1.10.1]: https://github.com/composer/composer/compare/1.10.0...1.10.1
 [1.10.0]: https://github.com/composer/composer/compare/1.10.0-RC...1.10.0

+ 4 - 2
src/Composer/Command/SelfUpdateCommand.php

@@ -84,8 +84,10 @@ EOT
         $versionsUtil = new Versions($config, $httpDownloader);
 
         // switch channel if requested
+        $requestedChannel = null;
         foreach (Versions::CHANNELS as $channel) {
             if ($input->getOption($channel)) {
+                $requestedChannel = $channel;
                 $versionsUtil->setChannel($channel);
                 break;
             }
@@ -130,8 +132,8 @@ EOT
         $latestVersion = $latest['version'];
         $updateVersion = $input->getArgument('version') ?: $latestVersion;
 
-        if (is_numeric($channel) && substr($latestStable['version'], 0, 1) !== $channel) {
-            $io->writeError('<warning>Warning: You forced the install of '.$latestVersion.' via --'.$channel.', but '.$latestStable['version'].' is the latest stable version. Updating to it via composer self-update --stable is recommended.</warning>');
+        if ($requestedChannel && is_numeric($requestedChannel) && substr($latestStable['version'], 0, 1) !== $requestedChannel) {
+            $io->writeError('<warning>Warning: You forced the install of '.$latestVersion.' via --'.$requestedChannel.', but '.$latestStable['version'].' is the latest stable version. Updating to it via composer self-update --stable is recommended.</warning>');
         }
 
         if (preg_match('{^[0-9a-f]{40}$}', $updateVersion) && $updateVersion !== $latestVersion) {

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

@@ -144,7 +144,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
                     if ($transportOptions['relative']) {
                         $fileSystem->symlink($shortestPath, $path);
                     } else {
-                        $fileSystem->symlink($absolutePath, $path);
+                        $fileSystem->symlink($realUrl, $path);
                     }
                 }
             } catch (IOException $e) {