Skip to content

Commit

Permalink
Merge pull request #2 from openeuropa/EWPP-4665
Browse files Browse the repository at this point in the history
EWPP-4665: Sync with drupal core phpstan
  • Loading branch information
drishu authored Dec 6, 2024
2 parents 57d94aa + ead74ce commit 8c6c377
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "EUPL-1.2",
"require": {
"php": ">=8.1",
"openeuropa/code-review": "OEL-3328-dev",
"openeuropa/code-review": "^3.0",
"drupal/coder": "^8.3.16",
"mglaman/phpstan-drupal": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.2",
Expand Down
1 change: 1 addition & 0 deletions dist/drupal-conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ parameters:
tasks.phpcs.standard: ./vendor/drupal/coder/coder_sniffer/Drupal
tasks.phpcs.triggered_by: '%drupal-conventions.triggered_by%'
tasks.phpstan.triggered_by: '%drupal-conventions.triggered_by%'
tasks.phpstan.configuration: ./vendor/openeuropa/code-review-drupal/dist/phpstan.drupal.neon
10 changes: 10 additions & 0 deletions dist/phpstan.drupal.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"

# Ignore common errors for now.
- "#Drupal calls should be avoided in classes, use dependency injection instead#"
- "#^Plugin definitions cannot be altered.#"
- "#^Class .* extends @internal class#"
- identifier: missingType.iterableValue

0 comments on commit 8c6c377

Please sign in to comment.