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
PHPStan complains about "Access to an uninitialized readonly property" when using destructuring to set a readonly property... even when doing so in a constructor.
Bug report
PHPStan complains about "Access to an uninitialized readonly property" when using destructuring to set a readonly property... even when doing so in a constructor.
And yes, this does actually work: https://3v4l.org/GjMjC#v8.1.6
This is probably related to #7155.
Code snippet that reproduces the problem
https://phpstan.org/r/faf5a79e-a7df-491f-9b61-b4139d1d27ba
Expected output
No errors should be reported for the provided snippet.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan helped me catch some dumb bugs while refactoring some classes to use readonly properties instead of magic methods.
The text was updated successfully, but these errors were encountered: