From 28224fe54385ed52b8d0f2990e366c300209cf4c Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Tue, 18 Feb 2025 01:30:13 +0100 Subject: [PATCH] Add PHPStan bootstrap file to load .env file --- phpstan.neon | 2 ++ tests/phpstan-bootstrap.php | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/phpstan-bootstrap.php diff --git a/phpstan.neon b/phpstan.neon index ae2046019..36be686e6 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -6,6 +6,8 @@ parameters: paths: - src - tests + bootstrapFiles: + - tests/phpstan-bootstrap.php symfony: container_xml_path: %rootDir%/../../../var/cache/dev/AppKernelDevDebugContainer.xml diff --git a/tests/phpstan-bootstrap.php b/tests/phpstan-bootstrap.php new file mode 100644 index 000000000..7336a19b1 --- /dev/null +++ b/tests/phpstan-bootstrap.php @@ -0,0 +1,7 @@ +bootEnv(dirname(__DIR__) . '/.env');