From fdb143ab95ee3a05c648e6c8048e1a0bbf5a2ab1 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Thu, 5 Dec 2024 16:36:35 +0800 Subject: [PATCH] Include wp-config.php in symbols --- phpstan.neon.dist | 4 ++++ phpstan.neon.example | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 1452c1e..ead7df1 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -21,6 +21,10 @@ parameters: scanDirectories: - /home/runner/work/convertkit-woocommerce/convertkit-woocommerce/wordpress/wp-content/plugins + # Location of constants for PHPStan to scan, building symbols. + scanFiles: + - /home/runner/work/convertkit-woocommerce/convertkit-woocommerce/wordpress/wp-config.php + # Should not need to edit anything below here # Rule Level: https://phpstan.org/user-guide/rule-levels level: 5 diff --git a/phpstan.neon.example b/phpstan.neon.example index 1803717..ead7df1 100644 --- a/phpstan.neon.example +++ b/phpstan.neon.example @@ -1,4 +1,4 @@ -# PHPStan configuration for local static analysis. +# PHPStan configuration for GitHub Actions. # Include PHPStan for WordPress configuration. includes: @@ -19,7 +19,11 @@ parameters: # Location of WordPress Plugins for PHPStan to scan, building symbols. scanDirectories: - - /Users/tim/Local Sites/convertkit-github/app/public/wp-content/plugins + - /home/runner/work/convertkit-woocommerce/convertkit-woocommerce/wordpress/wp-content/plugins + + # Location of constants for PHPStan to scan, building symbols. + scanFiles: + - /home/runner/work/convertkit-woocommerce/convertkit-woocommerce/wordpress/wp-config.php # Should not need to edit anything below here # Rule Level: https://phpstan.org/user-guide/rule-levels