Skip to content

Since 2.1.52 subsequent nested-key writes in foreach over finite literal-string keys are tracked as optional #14551

@janedbal

Description

@janedbal

Bug report

See snippet

Code snippet that reproduces the problem

https://phpstan.org/r/4e66f143-edf6-4275-a581-3378674498b9

Expected output

array{a?: array{x: 1, y: 2}, b?: array{x: 1, y: 2}}

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions