You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaring a child class with constructor property promotion for a property already declared in the parent class' constructor throws a fatal error at runtime when the child class is instantiated. PHPStan does not currently report this.
Yea, the issue with code here that you first set it in class B via property promotion and then try to modify it via constructor of class A. You shouldn't have public readonly in first place in class B.
Feature request
Declaring a child class with constructor property promotion for a property already declared in the parent class' constructor throws a fatal error at runtime when the child class is instantiated. PHPStan does not currently report this.
https://3v4l.org/oLdjg#v8.1.11
https://phpstan.org/r/cf781e9e-cfdd-4aae-855d-ead64bf16afa
Did PHPStan help you today? Did it make you happy in any way?
I saw that full support for the
list
type was recently introduced. Definitely looking forward to that.The text was updated successfully, but these errors were encountered: