diff --git a/composer.json b/composer.json index c998af9..3c96eb3 100644 --- a/composer.json +++ b/composer.json @@ -21,9 +21,9 @@ "codeception/util-universalframework": "^1.0", "php-webdriver/webdriver": "<=1.14.0", "wp-coding-standards/wpcs": "^3.0.0", - "phpstan/phpstan": "^1.7", - "szepeviktor/phpstan-wordpress": "^1.0", - "wp-cli/wp-cli": "2.8.1" + "phpstan/phpstan": "^1.0 || ^2.0", + "szepeviktor/phpstan-wordpress": "^1.0 || ^2.0", + "wp-cli/wp-cli": "2.11" }, "minimum-stability": "stable", "config": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 545ea4f..7dc6e9e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -18,6 +18,13 @@ parameters: scanDirectories: - /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress/wp-content/plugins + # Location of constants for PHPStan to scan, building symbols. + scanFiles: + - /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress/wp-config.php + + # Don't report unmatched ignored errors on older PHP versions (7.2, 7.3) + reportUnmatchedIgnoredErrors: false + # Should not need to edit anything below here # Rule Level: https://phpstan.org/user-guide/rule-levels level: 5 \ No newline at end of file diff --git a/phpstan.neon.example b/phpstan.neon.example index e2ba448..124ef84 100644 --- a/phpstan.neon.example +++ b/phpstan.neon.example @@ -18,6 +18,13 @@ parameters: scanDirectories: - /Users/tim/Local Sites/convertkit-github/app/public/wp-content/plugins + # Location of constants for PHPStan to scan, building symbols. + scanFiles: + - /Users/tim/Local Sites/convertkit-github/app/public/wp-config.php + + # Don't report unmatched ignored errors on older PHP versions (7.2, 7.3) + reportUnmatchedIgnoredErrors: false + # Should not need to edit anything below here # Rule Level: https://phpstan.org/user-guide/rule-levels level: 5 \ No newline at end of file