Skip to content

non-empty-array<mixed> does not except array with hasOffsetValue #12847

@SamMousa

Description

@SamMousa

Bug report

When adding a non-empty-array<mixed> type to a parameter it no longer accepts arrays with 1 or more known indexes.

Code snippet that reproduces the problem

https://phpstan.org/r/d5df4a8b-9cd7-4d13-9681-5ccff447cd76

Expected output

As far as I can tell this should work, ie I expect no errors.

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

Not today, I just ran it when I was about to log out and went down the rabbit hole xD, too late... gotta log off!

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