Skip to content

Commit 455d724

Browse files
authored
Merge pull request #135 from Kit/lint-code-php7.1
Run PHPStan against PHP 7.1+
2 parents e7bacc2 + 4212050 commit 455d724

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/coding-standards.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,4 @@ jobs:
145145
# Run PHPStan for static analysis.
146146
- name: Run PHPStan Static Analysis
147147
working-directory: ${{ env.PLUGIN_DIR }}
148-
if: ${{ contains('8.0 8.1 8.2 8.3 8.4', matrix.php-versions) }}
149148
run: php vendor/bin/phpstan analyse --memory-limit=1024M

phpstan-dev.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ includes:
66

77
# Parameters
88
parameters:
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:

phpstan.neon.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ includes:
66

77
# Parameters
88
parameters:
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:

phpstan.neon.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ includes:
66

77
# Parameters
88
parameters:
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:

0 commit comments

Comments
 (0)