mirror of
https://github.com/opdavies/build-configs.git
synced 2025-02-08 16:15:03 +00:00
chore: add missing values to the Config DTO
* Add `dockerfile.stages.*.extra_directories` as an optional list of strings. * Allow `php.phpstan` and `php.phpcs` to be `false` or a Collection so their configuration files can not be generated. * Add `php.phpunit` and allow it to be set to `false` so its configuration files can not be generated. * Add `database.extra_databases` * Add `php.phpstan.baseline` as an optional boolean. * Add `node.version` as a string.
This commit is contained in:
parent
5627480a1a
commit
16ad71f4f4
|
@ -1,11 +1,18 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## Unreleased
|
## 2023-11-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
* Add CHANGELOG.md.
|
* Add CHANGELOG.md.
|
||||||
* Add missing validation rules to the `Configuration` DTO object.
|
* Add missing validation rules to the `Configuration` DTO object.
|
||||||
|
* Add `dockerfile.stages.*.extra_directories` as an optional list of strings (used in the Drupal Commerce Kickstart example).
|
||||||
|
* Allow `php.phpstan` and `php.phpcs` to be `false` or a Collection so their configuration files can not be generated (used in the Drupal Commerce Kickstart example).
|
||||||
|
* Add `php.phpunit` and allow it to be set to `false` so its configuration files can not be generated (used in the Drupal Commerce Kickstart example).
|
||||||
|
* No further PHPUnit configuration is supported.
|
||||||
|
* Add `database.extra_databases`
|
||||||
|
* Add `php.phpstan.baseline` as an optional boolean.
|
||||||
|
* Add `node.version` as a string.
|
||||||
* Add a test to ensure the project type is a valid type.
|
* Add a test to ensure the project type is a valid type.
|
||||||
* Add a test to ensure the web server is a valid type.
|
* Add a test to ensure the web server is a valid type.
|
||||||
* Add a `test` task to `run` script.
|
* Add a `test` task to `run` script.
|
||||||
|
|
|
@ -13,6 +13,12 @@ final class Config
|
||||||
#[Assert\Collection(
|
#[Assert\Collection(
|
||||||
allowExtraFields: false,
|
allowExtraFields: false,
|
||||||
fields: [
|
fields: [
|
||||||
|
'extra_databases' => new Assert\Optional([
|
||||||
|
new Assert\Type('array'),
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
'type' => new Assert\Required([
|
'type' => new Assert\Required([
|
||||||
new Assert\Choice(choices: ['mariadb', 'mysql']),
|
new Assert\Choice(choices: ['mariadb', 'mysql']),
|
||||||
new Assert\Type('string'),
|
new Assert\Type('string'),
|
||||||
|
@ -55,6 +61,12 @@ final class Config
|
||||||
new Assert\Type('string'),
|
new Assert\Type('string'),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
'extra_directories' => new Assert\Optional([
|
||||||
|
new Assert\Type('array'),
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
'extends' => new Assert\Optional([
|
'extends' => new Assert\Optional([
|
||||||
new Assert\Type('string'),
|
new Assert\Type('string'),
|
||||||
]),
|
]),
|
||||||
|
@ -161,13 +173,8 @@ final class Config
|
||||||
#[Assert\Collection(
|
#[Assert\Collection(
|
||||||
allowExtraFields: false,
|
allowExtraFields: false,
|
||||||
fields: [
|
fields: [
|
||||||
'type' => new Assert\Required([
|
'version' => new Assert\Required([
|
||||||
new Assert\Type('array'),
|
new Assert\Type('string'),
|
||||||
new Assert\Collection([
|
|
||||||
'type' => new Assert\Required([
|
|
||||||
new Assert\Type('string'),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
)]
|
)]
|
||||||
|
@ -182,37 +189,53 @@ final class Config
|
||||||
new Assert\Type('string'),
|
new Assert\Type('string'),
|
||||||
]),
|
]),
|
||||||
'phpcs' => new Assert\Optional([
|
'phpcs' => new Assert\Optional([
|
||||||
new Assert\Collection([
|
new Assert\AtLeastOneOf(
|
||||||
'paths' => new Assert\Required([
|
constraints: [
|
||||||
new Assert\Type('array'),
|
new Assert\IsFalse(),
|
||||||
new Assert\Count(['min' => 1]),
|
new Assert\Collection([
|
||||||
new Assert\All([
|
'paths' => new Assert\Required([
|
||||||
new Assert\Type('string'),
|
new Assert\Type('array'),
|
||||||
|
new Assert\Count(['min' => 1]),
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
'standards' => new Assert\Required([
|
||||||
|
new Assert\Type('array'),
|
||||||
|
new Assert\Count(['min' => 1]),
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]
|
||||||
'standards' => new Assert\Required([
|
),
|
||||||
new Assert\Type('array'),
|
|
||||||
new Assert\Count(['min' => 1]),
|
|
||||||
new Assert\All([
|
|
||||||
new Assert\Type('string'),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
]),
|
]),
|
||||||
'phpstan' => new Assert\Optional([
|
'phpstan' => new Assert\Optional(
|
||||||
new Assert\Collection([
|
new Assert\AtLeastOneOf(
|
||||||
'level' => new Assert\Required([
|
constraints: [
|
||||||
new Assert\Type(['string', 'integer']),
|
new Assert\IsFalse(),
|
||||||
]),
|
new Assert\Collection([
|
||||||
'paths' => new Assert\Required([
|
'baseline' => new Assert\Optional([
|
||||||
new Assert\Type('array'),
|
new Assert\Type('boolean'),
|
||||||
new Assert\Count(['min' => 1]),
|
]),
|
||||||
new Assert\All([
|
'level' => new Assert\Required([
|
||||||
new Assert\Type('string'),
|
new Assert\Type(['string', 'integer']),
|
||||||
|
]),
|
||||||
|
'paths' => new Assert\Required([
|
||||||
|
new Assert\Type('array'),
|
||||||
|
new Assert\Count(['min' => 1]),
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]
|
||||||
]),
|
),
|
||||||
]),
|
),
|
||||||
|
'phpunit' => new Assert\Optional(
|
||||||
|
new Assert\IsFalse(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)]
|
)]
|
||||||
public array $php;
|
public array $php;
|
||||||
|
|
Loading…
Reference in a new issue