1
0
Fork 0

Adjust phar compiler to work with composer autoloader

pull/87/merge
Jordi Boggiano 2011-11-04 11:11:06 +01:00
parent b0e5d901ac
commit 60db5d2c3b
2 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,12 @@
#!/usr/bin/env php
<?php
require __DIR__.'/../tests/bootstrap.php';
if (!@include __DIR__.'/../vendor/.composer/autoload.php') {
die('You must set up the project dependencies, run the following commands:
wget http://getcomposer.org/composer.phar
php composer.phar install
');
}
use Composer\Compiler;

View File

@ -51,7 +51,19 @@ class Compiler
$this->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