diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index f72219b4c..7e25bfa73 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -151,5 +151,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=1250M \ No newline at end of file diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 04ed0477c..adf21a1bd 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 b8695d76c..8a10425e0 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: