mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 11:25:33 +01:00
test: ensure the project type is valid
This commit is contained in:
parent
08852c898a
commit
e9d5c4ea6f
5 changed files with 53 additions and 12 deletions
|
@ -221,7 +221,7 @@ final class Config
|
|||
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Type('string')]
|
||||
#[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'symfony'])]
|
||||
#[Assert\Choice(choices: ['astro', 'drupal', 'fractal', 'laravel', 'php-library', 'symfony', 'terraform'])]
|
||||
public string $type;
|
||||
|
||||
#[Assert\Type('array')]
|
||||
|
|
|
@ -4,10 +4,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Enum;
|
||||
|
||||
enum ProjectType
|
||||
enum ProjectType: string
|
||||
{
|
||||
case Astro;
|
||||
case Drupal;
|
||||
case Fractal;
|
||||
case Terraform;
|
||||
case Astro = 'astro';
|
||||
case Drupal = 'drupal';
|
||||
case Fractal = 'fractal';
|
||||
case Laravel = 'laravel';
|
||||
case PHPLibrary = 'php-library';
|
||||
case Symfony = 'symfony';
|
||||
case Terraform = 'terraform';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue