-
Notifications
You must be signed in to change notification settings - Fork 462
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
Extract ConstructorsHelper
#1328
Extract ConstructorsHelper
#1328
Conversation
d79d843
to
098c178
Compare
Does it solve phpstan/phpstan#6612 ? :) |
not yet, I thought of another PR. but can do that here too for sure :) |
Yeah, sure, this makes sense as a logical first step, you can add a 2nd commit that uses the new helper in a new place :) |
822138d
to
5870e1c
Compare
tests/PHPStan/Rules/Properties/data/missing-readonly-property-assign-phpdoc.php
Outdated
Show resolved
Hide resolved
…`ReadOnlyPropertyAssignRule`
5870e1c
to
a6bb5e1
Compare
Perfect, thank you! BTW About the |
That was basically my follow-up idea! (I think I hinted it in the original PR description) ;) Then I found https://wiki.php.net/rfc/readonly_classes though and wanted to ask if this ( |
That RFC is unrelated to what we need to do here. I'll work on 8.2 support after feature freeze. And my guess is that not a single line of code will need to be changed in PHPStan, only in BetterReflection 😊 |
OK, I'll add immutable support later, should be super-easy now. |
... and make use of it also in
ReadOnlyByPhpDocPropertyAssignRule
andReadOnlyPropertyAssignRule
.Closes phpstan/phpstan#6612