public function __construct($output = null)
{
$this->output = $output ?: new StreamOutput(fopen('php://output', 'w'));
$config = [];
foreach (['path.temp', 'path.cache', 'path.vendor', 'path.artifact', 'path.packages', 'system.api'] as $key) {
$config[$key] = App::get($key);
}
$this->composer = new Composer($config, $output);
}