Browse Source

Update composer and report branch loading errors on force update

Jordi Boggiano 12 years ago
parent
commit
61c091ea65
2 changed files with 7 additions and 4 deletions
  1. 4 4
      composer.lock
  2. 3 0
      src/Packagist/WebBundle/Controller/WebController.php

+ 4 - 4
composer.lock

@@ -7,12 +7,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer",
-                "reference": "967c771b26a888d2a31d4d611169201a4a7ff325"
+                "reference": "dae7f3cee7f0a88a6499b1b1f8f56e94a451db64"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://github.com/composer/composer/archive/967c771b26a888d2a31d4d611169201a4a7ff325.zip",
-                "reference": "967c771b26a888d2a31d4d611169201a4a7ff325",
+                "url": "https://github.com/composer/composer/archive/dae7f3cee7f0a88a6499b1b1f8f56e94a451db64.zip",
+                "reference": "dae7f3cee7f0a88a6499b1b1f8f56e94a451db64",
                 "shasum": ""
             },
             "require": {
@@ -27,7 +27,7 @@
                 "ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic",
                 "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages"
             },
-            "time": "1352113682",
+            "time": "1352114933",
             "bin": [
                 "bin/composer"
             ],

+ 3 - 0
src/Packagist/WebBundle/Controller/WebController.php

@@ -445,6 +445,9 @@ class WebController extends Controller
 
                 try {
                     $updater->update($package, $repository, Updater::UPDATE_TAGS);
+                    if ($repository->hadInvalidBranches()) {
+                        throw new \RuntimeException('Some branches contained invalid data and were discarded, it is advised to review the log and fix any issues present in branches');
+                    }
                 } catch (\Exception $e) {
                     return new Response(json_encode(array(
                         'status' => 'error',