Skip to content
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

array_udiff callback parameter types are not supported #6105

Closed
udavka opened this issue Nov 28, 2021 · 2 comments · Fixed by phpstan/phpstan-src#1407
Closed

array_udiff callback parameter types are not supported #6105

udavka opened this issue Nov 28, 2021 · 2 comments · Fixed by phpstan/phpstan-src#1407

Comments

@udavka
Copy link

udavka commented Nov 28, 2021

Feature request

array_udiff callback parameter types are not supported, mixeds are required in the maximal validation mode.

For example, in this case: https://phpstan.org/r/9509075f-ec61-4eba-941d-a8835055f0d1 it says "Parameter #3 $data_comp_func of function array_udiff expects callable(mixed, mixed): int, Closure(int, int): int<-1, 1> given.".

@ondrejmirtes
Copy link
Member

This is solvable by writing array_udiff stub here: https://github.com/phpstan/phpstan-src/blob/master/stubs/arrayFunctions.stub

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants