Browse Source

Merge branch '1.1'

Jordi Boggiano 9 năm trước cách đây
mục cha
commit
921af1c1b8

+ 6 - 0
CHANGELOG.md

@@ -1,3 +1,9 @@
+### [1.1.0] - 2016-05-10
+
+  * Added fallback to SSH for https bitbucket URLs
+  * Added BaseCommand::isProxyCommand that can be overriden to mark a command as being a mere proxy, which helps avoid duplicate warnings etc on composer startup
+  * Fixed archiving generating long paths in zip files on Windows
+
 ### [1.1.0-RC] - 2016-04-29
 ### [1.1.0-RC] - 2016-04-29
 
 
   * Added ability for plugins to register their own composer commands
   * Added ability for plugins to register their own composer commands

+ 5 - 5
composer.lock

@@ -429,7 +429,7 @@
         },
         },
         {
         {
             "name": "symfony/console",
             "name": "symfony/console",
-            "version": "v2.8.5",
+            "version": "v2.8.6",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
                 "url": "https://github.com/symfony/console.git",
@@ -489,7 +489,7 @@
         },
         },
         {
         {
             "name": "symfony/filesystem",
             "name": "symfony/filesystem",
-            "version": "v2.8.5",
+            "version": "v2.8.6",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
                 "url": "https://github.com/symfony/filesystem.git",
@@ -538,7 +538,7 @@
         },
         },
         {
         {
             "name": "symfony/finder",
             "name": "symfony/finder",
-            "version": "v2.8.5",
+            "version": "v2.8.6",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
                 "url": "https://github.com/symfony/finder.git",
@@ -646,7 +646,7 @@
         },
         },
         {
         {
             "name": "symfony/process",
             "name": "symfony/process",
-            "version": "v2.8.5",
+            "version": "v2.8.6",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
                 "url": "https://github.com/symfony/process.git",
@@ -1600,7 +1600,7 @@
         },
         },
         {
         {
             "name": "symfony/yaml",
             "name": "symfony/yaml",
-            "version": "v2.8.5",
+            "version": "v2.8.6",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
                 "url": "https://github.com/symfony/yaml.git",

+ 6 - 3
src/Composer/Package/Archiver/ZipArchiver.php

@@ -13,6 +13,7 @@
 namespace Composer\Package\Archiver;
 namespace Composer\Package\Archiver;
 
 
 use ZipArchive;
 use ZipArchive;
+use Composer\Util\Filesystem;
 
 
 /**
 /**
  * @author Jan Prieser <jan@prieser.net>
  * @author Jan Prieser <jan@prieser.net>
@@ -28,15 +29,17 @@ class ZipArchiver implements ArchiverInterface
      */
      */
     public function archive($sources, $target, $format, array $excludes = array())
     public function archive($sources, $target, $format, array $excludes = array())
     {
     {
-        $sources = realpath($sources);
+        $fs = new Filesystem();
+        $sources = $fs->normalizePath($sources);
+
         $zip = new ZipArchive();
         $zip = new ZipArchive();
         $res = $zip->open($target, ZipArchive::CREATE);
         $res = $zip->open($target, ZipArchive::CREATE);
         if ($res === true) {
         if ($res === true) {
             $files = new ArchivableFilesFinder($sources, $excludes);
             $files = new ArchivableFilesFinder($sources, $excludes);
             foreach ($files as $file) {
             foreach ($files as $file) {
                 /** @var $file \SplFileInfo */
                 /** @var $file \SplFileInfo */
-                $filepath = $file->getPath()."/".$file->getFilename();
-                $localname = str_replace($sources."/", '', $filepath);
+                $filepath = strtr($file->getPath()."/".$file->getFilename(), '\\', '/');
+                $localname = str_replace($sources.'/', '', $filepath);
                 if ($file->isDir()) {
                 if ($file->isDir()) {
                     $zip->addEmptyDir($localname);
                     $zip->addEmptyDir($localname);
                 } else {
                 } else {