Skip to content

Commit

Permalink
Merge pull request #216 from Yoast/feature/phpstan-2.0-update
Browse files Browse the repository at this point in the history
PHPStan 2.0: update configuration
  • Loading branch information
jrfnl authored Dec 8, 2024
2 parents 36f2d3f + 7b04c62 commit 91f3391
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
php-version: '7.4'
coverage: none
tools: phpstan:1.x
tools: phpstan:2.x

# Install dependencies and handle caching in one go.
# Dependencies need to be installed to make sure the PHPUnit classes are recognized.
Expand Down
15 changes: 15 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ parameters:
- src/Polyfills/AssertClosedResource.php

ignoreErrors:
# Level 4
# This is part of the functionality of this package. Safe to ignore.
-
message: "`^Call to function method_exists\\(\\) with '\\W+PHPUnit\\W+Framework…' and '(assert|expect|equalTo)[^']+' will always evaluate to true\\.$`"
count: 15
path: phpunitpolyfills-autoload.php

# The traits are functionality, but not used by the package itself. Can't be helped.
-
identifier: trait.unused
path: src/TestListeners/TestListenerDefaultImplementationPHPUnitLte5.php
-
identifier: trait.unused
path: src/TestListeners/TestListenerSnakeCaseMethods.php

# Level 5
-
# False positive, a string callback is perfectly fine, especially for static methods.
Expand Down

0 comments on commit 91f3391

Please sign in to comment.