Bug report
When running loops where you insert default values for a map when a key does not exists, and the loop contains another loop that loops and touches the same map by setting something, the typing is incorrect adjusted where the initial properties are made optional, while they are guaranteed to be there.
Code snippet that reproduces the problem
https://phpstan.org/r/6b4b38e7-3aa0-46b0-b3f1-57ffa28613ca
Expected output
The two dumped types should be equal, and the error should not be there.
Did PHPStan help you today? Did it make you happy in any way?
Using PHPStan with a lot of different projects and it keeps finding new code quality issues I need to solve, which is awesome!
Bug report
When running loops where you insert default values for a map when a key does not exists, and the loop contains another loop that loops and touches the same map by setting something, the typing is incorrect adjusted where the initial properties are made optional, while they are guaranteed to be there.
Code snippet that reproduces the problem
https://phpstan.org/r/6b4b38e7-3aa0-46b0-b3f1-57ffa28613ca
Expected output
The two dumped types should be equal, and the error should not be there.
Did PHPStan help you today? Did it make you happy in any way?
Using PHPStan with a lot of different projects and it keeps finding new code quality issues I need to solve, which is awesome!