Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use less-old phpstan
Browse files Browse the repository at this point in the history
phpstan 1.5 is very out of date and the API for defining rules is incompatible with the current API.

tests are currently failing, but they're failing upstream and they should pass once all the other PRs are merged

PHPStan 2.0 was released a few days ago, but other parts of our dependency tree are locked to "1.X", so for now I'm just updating to "most recent 1.X" and we can look at 2.0 after the rest is stable.
shish committed Nov 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3a6e43b commit d001fc2
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -105,13 +105,13 @@
"php": "^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.5",
"phpstan/phpstan": "^1",
"thecodingmachine/phpstan-strict-rules": "^1.0",
"squizlabs/php_codesniffer": "^3.2",
"phpunit/phpunit": "^9.5"
},
"scripts": {
"phpstan": "phpstan analyse lib -c phpstan.neon --level=max --no-progress -vvv",
"phpstan": "phpstan analyse",
"cs-fix": "phpcbf",
"cs-check": "phpcs"
},
@@ -120,4 +120,4 @@
"dev-master": "2.2.x-dev"
}
}
}
}
4 changes: 2 additions & 2 deletions generator/composer.json
Original file line number Diff line number Diff line change
@@ -19,11 +19,11 @@
"thecodingmachine/phpstan-strict-rules": "^1.0",
"squizlabs/php_codesniffer": "^3.2",
"php-coveralls/php-coveralls": "^2.1",
"phpstan/phpstan": "^1.5"
"phpstan/phpstan": "^1"
},
"scripts": {
"test": "vendor/bin/phpunit",
"phpstan": "phpstan analyse src -c phpstan.neon --level=max --no-progress -vvv",
"phpstan": "phpstan analyse",
"cs-fix": "phpcbf",
"cs-check": "phpcs"
},
6 changes: 5 additions & 1 deletion generator/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
parameters:
paths:
- ./src
# The level 9 is the highest level (with check for mixed type)
level: 8
ignoreErrors:
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
6 changes: 5 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
parameters:
paths:
- ./lib
# The level 9 is the highest level (with check for mixed type)
level: 8
ignoreErrors:
# A lot of functions are in extensions so it is ok not to find those
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon

0 comments on commit d001fc2

Please sign in to comment.