Skip to content

Precise unsealed array shape type is lost after ?? #15428

Closed
phpstan/phpstan-src
#6792

Description

@robotomarvin

Bug report

Affected after 2.3.0, most probably by usage analysis, PHPStan looses info about the type after doing $array['key'] ?? ''

Code snippet that reproduces the problem

https://phpstan.org/r/dbca1b50-bee3-45f0-aebd-1ff9ffdba19d

Expected output

No error

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

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions