Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade phpstan; increase phpstan level; fix a few bugs #55

Merged
merged 8 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ indent_size = 2

[*.php]
ij_php_align_multiline_parameters = false

[*.neon]
indent_style = tab
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"require-dev": {
"mink/driver-testsuite": "dev-master",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan": "^2",
"phpstan/phpstan-phpunit": "^2",
"phpunit/phpunit": "^9.6.8",
"symfony/error-handler": "^5.4 || ^6.0 || ^7.0",
"symfony/process": "^5.4 || ^6.0 || ^7.0",
Expand Down
47 changes: 37 additions & 10 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
parameters:
level: 8
paths:
- src
- tests
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
uuf6429 marked this conversation as resolved.
Show resolved Hide resolved

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
level: 10
paths:
- src
- tests
ignoreErrors:
-
# See: https://github.com/php-webdriver/php-webdriver/pull/1120
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:implicitlyWait\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
-
# See: https://github.com/php-webdriver/php-webdriver/pull/1120
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:pageLoadTimeout\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
-
# See: https://github.com/php-webdriver/php-webdriver/pull/1120
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:setScriptTimeout\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Method Mink\\WebdriverClassicDriver\\WebdriverClassicDriver\:\:getWindowHandleFromName\(\) should return string but returns mixed\.$#'
identifier: return.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Parameter \#1 \$handle of method Facebook\\WebDriver\\Remote\\RemoteTargetLocator\:\:window\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 3
path: src/WebdriverClassicDriver.php
Loading
Loading