Эх сурвалжийг харах

Avoid updating newer versions in case of version conflict

Jordi Boggiano 13 жил өмнө
parent
commit
0829c17d23

+ 4 - 0
src/Packagist/WebBundle/Command/UpdatePackagesCommand.php

@@ -158,6 +158,10 @@ EOF
         // check if we have that version yet
         foreach ($package->getVersions() as $existingVersion) {
             if ($existingVersion->equals($version)) {
+                // avoid updating newer versions, in case two branches have the same version in their composer.json
+                if ($existingVersion->getReleasedAt() > $data->getReleaseDate()) {
+                    return;
+                }
                 if ($existingVersion->getDevelopment()) {
                     $version = $existingVersion;
                     break;