Bug report
When casting an object to array, PHPStan appears not to consider that properties in child classes will also be included when iterating.
Code snippet that reproduces the problem
https://phpstan.org/r/f1bfae15-4eb5-4ca4-95f9-d7fc84983274
Expected output
No error should be reported.