diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index bc63013..acf9a3e 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -145,5 +145,4 @@ jobs: # Run PHPStan for static analysis. - name: Run PHPStan Static Analysis working-directory: ${{ env.PLUGIN_DIR }} - if: ${{ contains('8.0 8.1 8.2 8.3 8.4', matrix.php-versions) }} run: php vendor/bin/phpstan analyse --memory-limit=1024M \ No newline at end of file diff --git a/phpstan-dev.neon b/phpstan-dev.neon index c869685..a87ff5e 100644 --- a/phpstan-dev.neon +++ b/phpstan-dev.neon @@ -6,6 +6,11 @@ includes: # Parameters parameters: + # Analyse against the minimum supported PHP version. + # This flags features (union types, enums, str_contains, etc.) that would + # fail on older PHP versions regardless of which PHP version PHPStan runs on. + phpVersion: 70100 + # Paths to scan # This should comprise of the base Plugin PHP file, plus directories that contain Plugin PHP files paths: diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 66cade1..42a0ce8 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,6 +6,11 @@ includes: # Parameters parameters: + # Analyse against the minimum supported PHP version. + # This flags features (union types, enums, str_contains, etc.) that would + # fail on older PHP versions regardless of which PHP version PHPStan runs on. + phpVersion: 70100 + # Paths to scan # This should comprise of the base Plugin PHP file, plus directories that contain Plugin PHP files paths: diff --git a/phpstan.neon.example b/phpstan.neon.example index 66cade1..42a0ce8 100644 --- a/phpstan.neon.example +++ b/phpstan.neon.example @@ -6,6 +6,11 @@ includes: # Parameters parameters: + # Analyse against the minimum supported PHP version. + # This flags features (union types, enums, str_contains, etc.) that would + # fail on older PHP versions regardless of which PHP version PHPStan runs on. + phpVersion: 70100 + # Paths to scan # This should comprise of the base Plugin PHP file, plus directories that contain Plugin PHP files paths: