Skip to content

Commit 38291f6

Browse files
committed
PHPStan: set the phpVersion
* Set the `phpVersion` to `70100` (lowest possible). This prevents PHPStan throwing notices which are related to the PHP version on which PHPStan is being _run_, in contrast to the PHP version which the code _supports_. * With the `phpVersion` being set, PHPStan can now run on the `latest` PHP version in CI, though as long as the max PHPUnit version is PHPUnit 7.5, this _will_ throw deprecation notices, so let's leave that for now. Includes minor update to the config for something which is no longer needed.
1 parent bf77e4f commit 38291f6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/phpstan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
jobs:
2121
phpstan:
22-
name: "PHP: 7.4 | PHPStan"
22+
name: "PHPStan"
2323

2424
runs-on: "ubuntu-latest"
2525

phpstan.neon.dist

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
parameters:
2+
phpVersion: 70100 # Should be 50400, but PHPStan only accepts 70100 or higher...
23
level: 0
34
paths:
45
- src
@@ -8,7 +9,7 @@ parameters:
89
-
910
count: 1
1011
message: '~^Undefined variable: \$phpCodeSnifferConfig$~'
11-
path: %currentWorkingDirectory%/src/Config.php
12+
path: src/Config.php
1213

1314
dynamicConstantNames:
1415
- PHP_CODESNIFFER_IN_TESTS

0 commit comments

Comments
 (0)