feat(drupal): allow for disabling quality checks

For Commerce Kickstart, there are no custom modules so these checks will
fail in the CI pipeline.
This commit is contained in:
Oliver Davies 2023-10-18 20:38:53 +02:00
parent f58846ef20
commit 696aa5d617
3 changed files with 32 additions and 3 deletions

View file

@ -73,7 +73,6 @@ final class CreateListOfFilesToGenerate
new TemplateFile(data: 'drupal/.hadolint.yaml', name: '.hadolint.yaml'),
new TemplateFile(data: 'drupal/Dockerfile', name: 'Dockerfile'),
new TemplateFile(data: 'drupal/docker-compose.yaml', name: 'docker-compose.yaml'),
new TemplateFile(data: 'drupal/phpstan.neon.dist', name: 'phpstan.neon.dist'),
new TemplateFile(data: 'drupal/run', name: 'run'),
]);
@ -86,8 +85,18 @@ final class CreateListOfFilesToGenerate
));
}
$filesToGenerate->push(new TemplateFile(data: 'drupal/phpcs.xml.dist', name: 'phpcs.xml.dist'));
$filesToGenerate->push(new TemplateFile(data: 'drupal/phpunit.xml.dist', name: 'phpunit.xml.dist'));
if ($configurationDataDto->php['phpcs'] !== false) {
$filesToGenerate->push(new TemplateFile(data: 'drupal/phpcs.xml.dist', name: 'phpcs.xml.dist'));
}
if ($configurationDataDto->php['phpstan'] !== false) {
$filesToGenerate->push(new TemplateFile(data: 'drupal/phpstan.neon.dist', name: 'phpstan.neon.dist'));
}
if ($configurationDataDto->php['phpunit'] !== false) {
$filesToGenerate->push(new TemplateFile(data: 'drupal/phpunit.xml.dist', name: 'phpunit.xml.dist'));
}
$filesToGenerate->push(new TemplateFile(
data: 'drupal/docker-entrypoint-php',
name: 'docker-entrypoint-php',

View file

@ -59,4 +59,6 @@ final class Config
#[Assert\NotBlank]
public ?string $projectRoot;
public array $php;
}