mirror of
https://github.com/opdavies/versa.git
synced 2025-03-20 12:05:24 +00:00
Remove duplicate filesystem
This commit is contained in:
parent
3cccf56482
commit
53eb833f85
|
@ -11,7 +11,6 @@ use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
|
||||||
|
|
||||||
#[AsCommand(
|
#[AsCommand(
|
||||||
description: 'Install the project\'s dependencies',
|
description: 'Install the project\'s dependencies',
|
||||||
|
@ -33,8 +32,6 @@ final class BuildCommand extends AbstractCommand
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
))->getLanguage();
|
))->getLanguage();
|
||||||
|
|
||||||
$filesystem = new Filesystem();
|
|
||||||
|
|
||||||
// Attempt to prepopulate some of the options, such as the project type
|
// Attempt to prepopulate some of the options, such as the project type
|
||||||
// based on its dependencies.
|
// based on its dependencies.
|
||||||
// TODO: move this logic to a service so it can be tested.
|
// TODO: move this logic to a service so it can be tested.
|
||||||
|
@ -54,7 +51,7 @@ final class BuildCommand extends AbstractCommand
|
||||||
} elseif ($this->isSymfonyProject($dependencies)) {
|
} elseif ($this->isSymfonyProject($dependencies)) {
|
||||||
$projectType = ProjectType::Symfony->value;
|
$projectType = ProjectType::Symfony->value;
|
||||||
}
|
}
|
||||||
} elseif ($filesystem->exists($workingDir.'/fractal.config.js')) {
|
} elseif ($this->filesystem->exists($workingDir.'/fractal.config.js')) {
|
||||||
$language = ProjectLanguage::JavaScript->value;
|
$language = ProjectLanguage::JavaScript->value;
|
||||||
$projectType = ProjectType::Fractal->value;
|
$projectType = ProjectType::Fractal->value;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +60,7 @@ final class BuildCommand extends AbstractCommand
|
||||||
// with the option value if there is one.
|
// with the option value if there is one.
|
||||||
$projectType = $input->getOption('type') ?? $projectType;
|
$projectType = $input->getOption('type') ?? $projectType;
|
||||||
|
|
||||||
$isDockerCompose = $filesystem->exists($workingDir . '/docker-compose.yaml');
|
$isDockerCompose = $this->filesystem->exists($workingDir . '/docker-compose.yaml');
|
||||||
|
|
||||||
switch ($language) {
|
switch ($language) {
|
||||||
case ProjectLanguage::PHP->value:
|
case ProjectLanguage::PHP->value:
|
||||||
|
|
Loading…
Reference in a new issue