Bug report
When I declare a @property-read int $foo on a class that does not have an actual $foo Property, trying to write to the property generates an error. But if there is a private int $foo property, this error disappears, even for write accesses from outside the class.
Code snippet that reproduces the problem
https://phpstan.org/r/1d80dcca-a9f4-4dee-809b-11471e29a6f0
Expected output
Line 38 should also trigger the assign.propertyReadOnly` error.
Did PHPStan help you today? Did it make you happy in any way?
No response