Make phar build fails more debuggable
parent
7ae0dd2a2a
commit
cfc8bf0730
|
@ -8,5 +8,10 @@ use Composer\Compiler;
|
||||||
error_reporting(-1);
|
error_reporting(-1);
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
try {
|
||||||
$compiler = new Compiler();
|
$compiler = new Compiler();
|
||||||
$compiler->compile();
|
$compiler->compile();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
echo 'Failed to compile phar: ['.get_class($e).'] '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine();
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
|
@ -58,7 +58,9 @@ class AllFunctionalTest extends \PHPUnit_Framework_TestCase
|
||||||
$proc = new Process('php '.escapeshellarg(__DIR__.'/../../../bin/compile'));
|
$proc = new Process('php '.escapeshellarg(__DIR__.'/../../../bin/compile'));
|
||||||
$exitcode = $proc->run();
|
$exitcode = $proc->run();
|
||||||
|
|
||||||
$this->assertSame(0, $exitcode);
|
if ($exitcode !== 0 || trim($proc->getOutput())) {
|
||||||
|
$this->fail($proc->getOutput());
|
||||||
|
}
|
||||||
$this->assertTrue(file_exists(self::$pharPath));
|
$this->assertTrue(file_exists(self::$pharPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue