From 60db5d2c3b96bffb4e4bc9b17f250767a252c96e Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 4 Nov 2011 11:11:06 +0100 Subject: [PATCH] Adjust phar compiler to work with composer autoloader --- bin/compile | 7 ++++++- src/Composer/Compiler.php | 14 +++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 3cdf790d7..62e111228 100755 --- a/bin/compile +++ b/bin/compile @@ -1,7 +1,12 @@ #!/usr/bin/env php addFile($phar, $file); } - $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../tests/bootstrap.php')); + $finder = new Finder(); + $finder->files() + ->ignoreVCS(true) + ->name('*.php') + ->in(__DIR__.'/../../vendor/symfony/') + ; + + foreach ($finder as $file) { + $this->addFile($phar, $file); + } + + $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/.composer/autoload.php')); + $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/.composer/autoload_namespaces.php')); $this->addComposerBin($phar); // Stubs