1
0
Fork 0

Merge remote-tracking branch 'github-composer/master' into plugins

* github-composer/master:
  Make sure directories we are downloading to are empty
  Fix parsing of trunk in SvnDriver, fixes composer/satis#88
  Fix file layout in unit tests
  Fix parse error thrown in PHP5.5+
pull/2179/head
Nils Adermann 2013-08-31 15:43:25 +02:00
commit 786ea2929b
6 changed files with 18 additions and 7 deletions

View File

@ -460,9 +460,10 @@ REGISTER_AUTOLOAD;
REGISTER_LOADER;
if ($useIncludeFiles) {
$file .= <<<INCLUDE_FILES
foreach (require __DIR__ . '/autoload_files.php' as \$file) {
require \$file;
$file .= <<<'INCLUDE_FILES'
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
require $file;
}

View File

@ -85,6 +85,7 @@ class FileDownloader implements DownloaderInterface
throw new \InvalidArgumentException('The given package is missing url information');
}
$this->filesystem->removeDirectory($path);
$this->filesystem->ensureDirectoryExists($path);
$fileName = $this->getFileName($package, $path);

View File

@ -193,7 +193,13 @@ class SvnDriver extends VcsDriver
if (null === $this->branches) {
$this->branches = array();
$output = $this->execute('svn ls --verbose', $this->baseUrl . '/');
if (false === strpos($this->trunkPath, '/')) {
$trunkParent = $this->baseUrl . '/';
} else {
$trunkParent = $this->baseUrl . '/' . dirname($this->trunkPath) . '/';
}
$output = $this->execute('svn ls --verbose', $trunkParent);
if ($output) {
foreach ($this->process->splitLines($output) as $line) {
$line = trim($line);

View File

@ -38,7 +38,8 @@ class ComposerAutoloaderInitFilesAutoloadOrder
$loader->register(true);
foreach (require __DIR__ . '/autoload_files.php' as $file) {
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
require $file;
}

View File

@ -38,7 +38,8 @@ class ComposerAutoloaderInitFilesAutoload
$loader->register(true);
foreach (require __DIR__ . '/autoload_files.php' as $file) {
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
require $file;
}

View File

@ -40,7 +40,8 @@ class ComposerAutoloaderInitTargetDir
$loader->register(true);
foreach (require __DIR__ . '/autoload_files.php' as $file) {
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
require $file;
}