diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 903f533..b5571c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/composer.json b/composer.json index dcc46f1..72b0afb 100644 --- a/composer.json +++ b/composer.json @@ -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" } } diff --git a/phpstan.neon b/phpstan.neon index 3bec62c..5ff0591 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -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