-
-
Notifications
You must be signed in to change notification settings - Fork 887
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
Make @psalm-readonly-allow-private-mutation as alias of readonly #7774
Comments
|
@ondrejmirtes |
I don't want these extra features now, I just want to be cross-compatible with Psalm. Just test the code you added 😊 |
Ok, I'll make a proposal in another issue to add the feature. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature request
In Psalm,
@psalm-readonly-allow-private-mutation
is shorthand for combining@readonly
and@psalm-allow-private-mutation
. Adding@psalm-readonly-allow-private-mutation
to PHPStan as an alias for@readonly
improves interoperability.I liked Psalm's
@psalm-allow-private-mutation
so I looked into PHPStan's implementation to bring the same functionality into PHPStan, but found thatReadOnlyByPhpDocPropertyAssignRule
implicitly behaves as a private mutation. So we don't need to add@phpstan-allow-private-mutation
.Did PHPStan help you today? Did it make you happy in any way?
I've been working on a major refactoring for the last few days and I'm really grateful for PHPStan.
The text was updated successfully, but these errors were encountered: