Bug report
According to the RFC assigning readonly properties should be allowed in __unserialize method.
Code snippet that reproduces the problem
https://phpstan.org/r/baac0f50-da4d-47a7-83d2-95eb8a4ea4ac
PHP 8.1 just allows this, as stated per RFC, https://3v4l.org/53Dug#v8.1.1
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
Thank you for making PHPStan better every day! It's amazing.
--
PR to solve it: