From f911d525731e1d739fc9a43516dcb8007b20f72a Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 6 Oct 2023 15:26:10 +0100 Subject: [PATCH] feat(drupal): re-add phpstan.neon.dist --- src/Action/CreateListOfFilesToGenerate.php | 1 + templates/drupal/phpstan.neon.dist.twig | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 templates/drupal/phpstan.neon.dist.twig diff --git a/src/Action/CreateListOfFilesToGenerate.php b/src/Action/CreateListOfFilesToGenerate.php index ae24aac..9838f42 100644 --- a/src/Action/CreateListOfFilesToGenerate.php +++ b/src/Action/CreateListOfFilesToGenerate.php @@ -66,6 +66,7 @@ final class CreateListOfFilesToGenerate new TemplateFile(data: 'drupal/Dockerfile', name: 'Dockerfile'), new TemplateFile(data: 'drupal/docker-compose.yaml', name: 'docker-compose.yaml'), new TemplateFile(data: 'drupal/justfile', name: 'justfile'), + new TemplateFile(data: 'drupal/phpstan.neon.dist', name: 'phpstan.neon.dist'), ]); $extraDatabases = Arr::get($configurationData, 'database.extra_databases', []); diff --git a/templates/drupal/phpstan.neon.dist.twig b/templates/drupal/phpstan.neon.dist.twig new file mode 100644 index 0000000..a4abb27 --- /dev/null +++ b/templates/drupal/phpstan.neon.dist.twig @@ -0,0 +1,16 @@ +# {{ managedText | raw }} + +parameters: + level: {{ php.phpstan.level }} + excludePaths: + - *Test.php + - *TestBase.php + paths: + {% for path in php.phpstan.paths -%} + - {{ path }} + {%- endfor %} + +{% if php.phpstan.baseline %} +includes: + - phpstan-baseline.neon +{% endif %}