public function build()
{
$buildDir = $this->copyToBuildDir();
// The composer.json file may not exist at this stage, if the user has
// manually specified a Composer toolstack (e.g. php:symfony).
if (file_exists($buildDir . '/composer.json')) {
$this->output->writeln("Found a composer.json file; installing dependencies");
$args = [$this->shellHelper->resolveCommand('composer'), 'install', '--no-progress', '--prefer-dist', '--optimize-autoloader', '--no-interaction', '--no-ansi'];
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
$args[] = '-vvv';
} elseif ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
$args[] = '-vv';
} elseif ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$args[] = '-v';
}
$this->shellHelper->execute($args, $buildDir, true, false);
}
$this->processSpecialDestinations();
}