Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SamMousa opened this issue Apr 7, 2025 · 0 comments · Fixed by phpstan/phpstan-src#3924
Closed

Comments

@SamMousa
Copy link

SamMousa commented Apr 7, 2025

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant