Fix PHP install command
This commit is contained in:
parent
4ebfd9333a
commit
b44c713acf
1 changed files with 8 additions and 5 deletions
|
@ -22,12 +22,15 @@ final class InstallCommand extends AbstractCommand
|
||||||
public function execute(InputInterface $input, OutputInterface $output): int
|
public function execute(InputInterface $input, OutputInterface $output): int
|
||||||
{
|
{
|
||||||
$args = $input->getOption('args');
|
$args = $input->getOption('args');
|
||||||
|
$language = $input->getOption('language');
|
||||||
$workingDir = $input->getOption('working-dir');
|
$workingDir = $input->getOption('working-dir');
|
||||||
|
|
||||||
$language = $input->getOption('language') ?? (new DetermineProjectLanguage(
|
if ($language === null) {
|
||||||
filesystem: $this->filesystem,
|
$language = (new DetermineProjectLanguage(
|
||||||
workingDir: $workingDir,
|
filesystem: $this->filesystem,
|
||||||
))->getLanguage();
|
workingDir: $workingDir,
|
||||||
|
))->getLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Composer in Docker Compose?
|
// TODO: Composer in Docker Compose?
|
||||||
$process = Process::create(
|
$process = Process::create(
|
||||||
|
@ -50,7 +53,7 @@ final class InstallCommand extends AbstractCommand
|
||||||
*/
|
*/
|
||||||
private function getCommand(string $language, string $workingDir): array
|
private function getCommand(string $language, string $workingDir): array
|
||||||
{
|
{
|
||||||
if ($language === ProjectLanguage::JavaScript->value) {
|
if ($language === ProjectLanguage::PHP->value) {
|
||||||
return ['composer', 'install'];
|
return ['composer', 'install'];
|
||||||
} elseif ($language === ProjectLanguage::JavaScript->value) {
|
} elseif ($language === ProjectLanguage::JavaScript->value) {
|
||||||
$packageManager = new DeterminePackageManager(
|
$packageManager = new DeterminePackageManager(
|
||||||
|
|
Reference in a new issue