mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 19:35:33 +01:00
39 lines
933 B
PHP
39 lines
933 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace OliverDaviesLtd\BuildConfigs;
|
||
|
|
||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||
|
|
||
|
final class ConfigurationData
|
||
|
{
|
||
|
#[Assert\Collection(
|
||
|
allowExtraFields: false,
|
||
|
fields: [
|
||
|
'extra_databases' => new Assert\Optional(
|
||
|
new Assert\All(new Assert\Type('string'))
|
||
|
),
|
||
|
'type' => new Assert\Choice(['mariadb', 'mysql']),
|
||
|
'version' => new Assert\Type('integer'),
|
||
|
],
|
||
|
allowExtraFields: false,
|
||
|
)]
|
||
|
public array $database;
|
||
|
|
||
|
#[Assert\Choice(choices: ['node', 'php'])]
|
||
|
#[Assert\NotBlank]
|
||
|
public string $language;
|
||
|
|
||
|
#[Assert\Length(min: 1)]
|
||
|
#[Assert\NotBlank]
|
||
|
public string $name;
|
||
|
|
||
|
#[Assert\Choice(choices: ['drupal-project', 'fractal', 'laravel', 'php-library'])]
|
||
|
#[Assert\NotBlank]
|
||
|
public string $type;
|
||
|
|
||
|
#[Assert\NotBlank]
|
||
|
public ?string $projectRoot;
|
||
|
}
|