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
…`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
ReadOnlyByPhpDocPropertyAssignRuleandReadOnlyPropertyAssignRule.Closes phpstan/phpstan#6612