-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#1376Labels
Milestone
Description
Bug report
The @readonly PHPDoc tag is ignored when used on a promoted property in a class constructor.
Code snippet that reproduces the problem
https://phpstan.org/r/139ee2b1-9c8c-4ffa-84dc-980dfc1aa320
Expected output
The provided snippet ought to complain that Example#doStuff() modifies Example#foo.
Did PHPStan help you today? Did it make you happy in any way?
It helped me catch several typos while doing a big refactor. I am very glad to discover these issues during development rather than runtime.