Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

Jordi Boggiano 13 lat temu
rodzic
commit
06675259d9
2 zmienionych plików z 8 dodań i 5 usunięć
  1. 4 4
      doc/04-schema.md
  2. 4 1
      src/Composer/Downloader/ZipDownloader.php

+ 4 - 4
doc/04-schema.md

@@ -140,8 +140,8 @@ The recommended notation for the most common licenses is (alphabetical):
     GPL-2.0+
     GPL-2.0+
     GPL-3.0
     GPL-3.0
     GPL-3.0+
     GPL-3.0+
-    LGPL-2.0
-    LGPL-2.0+
+    LGPL-2.1
+    LGPL-2.1+
     LGPL-3.0
     LGPL-3.0
     LGPL-3.0+
     LGPL-3.0+
     MIT
     MIT
@@ -163,7 +163,7 @@ An Example for disjunctive licenses:
 
 
     {
     {
         "license": [
         "license": [
-           "LGPL-2.0",
+           "LGPL-2.1",
            "GPL-3.0+"
            "GPL-3.0+"
         ]
         ]
     }
     }
@@ -171,7 +171,7 @@ An Example for disjunctive licenses:
 Alternatively they can be separated with "or" and enclosed in parenthesis;
 Alternatively they can be separated with "or" and enclosed in parenthesis;
 
 
     {
     {
-        "license": "(LGPL-2.0 or GPL-3.0+)"
+        "license": "(LGPL-2.1 or GPL-3.0+)"
     }
     }
 
 
 Similarly when multiple licenses need to be applied ("conjunctive license"),
 Similarly when multiple licenses need to be applied ("conjunctive license"),

+ 4 - 1
src/Composer/Downloader/ZipDownloader.php

@@ -54,7 +54,10 @@ class ZipDownloader extends ArchiveDownloader
             throw new \UnexpectedValueException($this->getErrorMessage($retval, $file));
             throw new \UnexpectedValueException($this->getErrorMessage($retval, $file));
         }
         }
 
 
-        $zipArchive->extractTo($path);
+        if (true !== $zipArchive->extractTo($path)) {
+            throw new \RuntimeException("There was an error extracting the ZIP file. Corrupt file?");
+        }
+
         $zipArchive->close();
         $zipArchive->close();
     }
     }