-
Notifications
You must be signed in to change notification settings - Fork 24
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
support phpstan 1.0; drop support for phpstan < 1.0 #26
Conversation
locally the tests pass now. I have 0 experience with this lib, please take it with a grain of salt |
return new CallMethodsRule( | ||
$broker, | ||
new FunctionCallParametersCheck($ruleLevelHelper, true, true, true, true), | ||
new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, 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.
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'm just looking around, but from looking into phpstan core, I don't see that the booleans are added to the FunctionCallParametersCheck, only the last boolean was removed.
Frankly, it seems odd that the instantiation of FunctionCallParametersCheck did not include the nullsafe check, phpversion and helper before and was just passing the booleans instead..
Feels like it should either stay the same as:
...true, true, true, true
unless there's a reason for disabling the checks..
Anyways, I temporarily updated phpstan-safe-rule in my project with this fork and it seems it works just as well as previously. Hope this helps..
EDIT: sorry just noticed it's a test..
Fixes #25 |
Any updates on this? |
I can confirm it "just works" for my use-case; I referenced the last commit in this PR: "thecodingmachine/phpstan-safe-rule": "dev-master#a630c7bf9f3060b6e3dc74a4d9ef5edc0feec052", and added this repository to my {
"type": "package",
"package": {
"name": "thecodingmachine/phpstan-safe-rule",
"type": "library",
"version": "dev-master",
"dist": {
"url": "https://codeload.github.com/thecodingmachine/phpstan-safe-rule/legacy.zip/a630c7bf9f3060b6e3dc74a4d9ef5edc0feec052",
"type": "zip"
},
"autoload": {
"psr-4": {
"TheCodingMachine\\Safe\\PHPStan\\": "src/"
}
}
}
} |
Can someone please merge and release this? Thanks |
Hey @staabm , Thanks a lot for the PR! Could you also please update the https://github.com/thecodingmachine/phpstan-safe-rule/blob/master/composer.json#L38-L40 This way, the "1.0.x" tags will stay associated with PHPStan <= 0.12 and the 1.1.x tags will remain associated with PHPStan 1 |
@moufmouf done |
So quick! Thanks a lot for the PR ❤️ |
Bäm, thank you very much! 🎉 |
phpstan 0.x will no longer be supported. prepare the rule for phpstan 1.0+
Fixes #25