@@ -6,6 +6,11 @@ includes:
66
77# Parameters
88parameters:
9+ # Analyse against the minimum supported PHP version.
10+ # This flags features (union types, enums, str_contains, etc.) that would
11+ # fail on older PHP versions regardless of which PHP version PHPStan runs on.
12+ phpVersion: 70100
13+
914 # Paths to scan
1015 # This should comprise of the base Plugin PHP file, plus directories that contain Plugin PHP files
1116 paths:
@@ -25,11 +30,17 @@ parameters:
2530 scanFiles:
2631 - /home/runner/work/convertkit-woocommerce/convertkit-woocommerce/wordpress/wp-config.php
2732
28- # Should not need to edit anything below here
29- # Rule Level: https://phpstan.org/user-guide/rule-levels
30- level: 5
33+ # Don't report unmatched ignored errors on older PHP versions (7.2, 7.3)
34+ reportUnmatchedIgnoredErrors: false
3135
3236 # Ignore the following errors, as PHPStan and PHPStan for WordPress haven't registered symbols for them yet,
3337 # so they're false positives.
3438 ignoreErrors:
35- - '#Call to an undefined method WC_Order_Item::get_product\(\).#'
39+ - '#unknown class WC_Session_Handler#'
40+ - '#unknown class WC_Order_Item#'
41+ - '#Call to an undefined method WC_Order_Item::get_product\(\).#'
42+ - '#No error to ignore is reported#'
43+
44+ # Should not need to edit anything below here
45+ # Rule Level: https://phpstan.org/user-guide/rule-levels
46+ level: 5
0 commit comments