mirror of
https://github.com/opdavies/versa.git
synced 2025-01-22 11:37:33 +00:00
Add a Symfony project type
This commit is contained in:
parent
4c9abd8599
commit
de5b3af017
|
@ -4,6 +4,7 @@
|
|||
|
||||
### Added
|
||||
|
||||
* Add a Symfony project type.
|
||||
* Automatically use PHPUnit or ParaTest based on `require-dev` dependencies.
|
||||
* Automatically find the PHP project type (i.e. Drupal or Sculpin) based on its `composer.json` dependencies.
|
||||
* Add `versa build` to build a Sculpin project.
|
||||
|
|
|
@ -9,4 +9,5 @@ enum ProjectType: string
|
|||
// PHP.
|
||||
case Drupal = 'drupal';
|
||||
case Sculpin = 'sculpin';
|
||||
case Symfony = 'symfony';
|
||||
}
|
||||
|
|
5
versa
5
versa
|
@ -68,6 +68,8 @@ $application->setCode(function (InputInterface $input): int {
|
|||
$projectType = ProjectType::Drupal->value;
|
||||
} elseif (in_array(needle: 'sculpin/sculpin', haystack: $dependencies, strict: true)) {
|
||||
$projectType = ProjectType::Sculpin->value;
|
||||
} elseif (in_array(needle: 'symfony/framework-bundle', haystack: $dependencies, strict: true)) {
|
||||
$projectType = ProjectType::Symfony->value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,6 +94,9 @@ $application->setCode(function (InputInterface $input): int {
|
|||
}
|
||||
break;
|
||||
|
||||
case ProjectType::Symfony->value:
|
||||
throw new RuntimeException('No build command set for Symfony projects.');
|
||||
|
||||
case ProjectType::Sculpin->value:
|
||||
$process = Process::create(
|
||||
command: ['./vendor/bin/sculpin', 'generate'],
|
||||
|
|
Loading…
Reference in a new issue