Skip to content

Commit

Permalink
Fixed ignored errors in PHPStan
Browse files Browse the repository at this point in the history
- Updated phpstan.neon
- Updated CI workflow
- Updated composer.json
  • Loading branch information
josemmo committed Feb 8, 2024
1 parent 4fcbd07 commit a00b4c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:

# Run static analyzer
- name: Run static analyzer
run: vendor/bin/phpstan
if: ${{ success() && matrix.php-version != '7.1' }}
run: vendor/bin/phpstan --error-format=github

# Run tests
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"ext-mysqli": "*"
},
"require-dev": {
"phpstan/phpstan": "^1.4|^1.10",
"phpstan/phpstan": "^1.10",
"symfony/phpunit-bridge": "*",
"phpstan/phpstan-strict-rules": "^1.1|^1.5"
"phpstan/phpstan-strict-rules": "^1.5"
}
}
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ parameters:
strictRules:
disallowedConstructs: false
strictCalls: false
ignoreErrors:
- message: '#^Call to an undefined method mysqli_result\:\:fetch_column\(\)\.$#'
path: src/Result.php
reportUnmatched: false
- message: '#^Parameter \#6 \$socket of class mysqli constructor expects string, string\|null given\.$#'
path: src/UMySQL.php
reportUnmatched: false
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon

0 comments on commit a00b4c7

Please sign in to comment.