-
Notifications
You must be signed in to change notification settings - Fork 155
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
[TASK] Upgrade to PHPStan 2.x and Rector 2.x #1376
Conversation
For this change, we'll need to drop support for PHP < 7.4 first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we'd need have a minimum dev requirement of PHP 7.4 for this upgrade, whilst there would no such requirement for users of the package. Is such a configuration possible?
|
||
# Allow instanceof checks, particularly in tests | ||
checkAlwaysTrueCheckTypeFunctionCall: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this check should not be disabled per se, and if possible the setting could be applied on a per directory basis: i.e. for tests
which can by static analysis be proven to pass. Though I'd quite like the double confirmation.
It's just a dev requirement. |
No, not as far as I know. |
We could allow both versions, though. |
Yes, I think that's the solution, with |
We'll allow `assertInstanceOf` checks in the tests again in a later change.
8c04331
to
597ee7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, I think.
ignore: | ||
- dependency-name: "phpstan/*" | ||
- dependency-name: "phpunit/phpunit" | ||
versions: [ ">= 10.0.0" ] | ||
- dependency-name: "rawr/cross-data-providers" | ||
- dependency-name: "rector/rector" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume that the GitHub action is unable to cope with OR
depencies. This can be revisted later if and when it is able.
We'll allow
assertInstanceOf
checks in the tests again in a later change.