Merge branch '1.1'
commit
921af1c1b8
|
@ -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
|
||||
|
||||
* Added ability for plugins to register their own composer commands
|
||||
|
|
|
@ -429,7 +429,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.8.5",
|
||||
"version": "v2.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
|
@ -489,7 +489,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v2.8.5",
|
||||
"version": "v2.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
|
@ -538,7 +538,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v2.8.5",
|
||||
"version": "v2.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
|
@ -646,7 +646,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v2.8.5",
|
||||
"version": "v2.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
|
@ -1600,7 +1600,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.5",
|
||||
"version": "v2.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
namespace Composer\Package\Archiver;
|
||||
|
||||
use ZipArchive;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* @author Jan Prieser <jan@prieser.net>
|
||||
|
@ -28,15 +29,17 @@ class ZipArchiver implements ArchiverInterface
|
|||
*/
|
||||
public function archive($sources, $target, $format, array $excludes = array())
|
||||
{
|
||||
$sources = realpath($sources);
|
||||
$fs = new Filesystem();
|
||||
$sources = $fs->normalizePath($sources);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$res = $zip->open($target, ZipArchive::CREATE);
|
||||
if ($res === true) {
|
||||
$files = new ArchivableFilesFinder($sources, $excludes);
|
||||
foreach ($files as $file) {
|
||||
/** @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()) {
|
||||
$zip->addEmptyDir($localname);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue