Skip to content

Array shapes with generics not resolving type correctly #3034

@TRowbotham

Description

@TRowbotham

Bug report

phpstan is not correctly resolving the types with generics and array shapes correctly. The error message shows the expected types, but phpstan thinks they are different.

Code snippet that reproduces the problem

https://phpstan.org/r/9fe5d121-5b1c-4049-ac4f-6bf6ab309cfd

Expected output

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions