diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 88f0f4e68..e051f4e60 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -460,9 +460,10 @@ REGISTER_AUTOLOAD; REGISTER_LOADER; if ($useIncludeFiles) { - $file .= <<filesystem->removeDirectory($path); $this->filesystem->ensureDirectoryExists($path); $fileName = $this->getFileName($package, $path); diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index b979c2e4b..c5a67b455 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/src/Composer/Repository/Vcs/SvnDriver.php @@ -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); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php b/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php index 376f8512c..9321b86c8 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php @@ -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; } diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php b/tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php index 3ddbc9ca9..6407c93b7 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php @@ -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; } diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php b/tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php index 347454fc5..32e155422 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php @@ -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; }