You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed some weeks ago that PHP is allowing objects in array_walk and array_walk_recursive internal functions.
Therefore, the error InvalidArgument - file.php:line:col - Argument 1 of array_walk expects array<array-key, mixed>, stdClass provided should not be triggered.
See: https://psalm.dev/r/0aeeb09741
I already helped in providing a PR for PHPStan which had the same issue as yours: phpstan/phpstan-src#573. The PR was incomplete but still, the feature to allow objects in such function was accepted
I don't know yet how you're referencing internal PHP functions, but if this is something like PHPStan, I could probably provide you a PR for that.
Have a nice day.
Regards,
The text was updated successfully, but these errors were encountered:
Problem is this file is too big to be edited via GitHub WebIDE so I can't propose a PR fastly. I need to do it in the old fashion way by cloning a fork...
I'm trying to provide something currently.
Please be aware that for PHPStan, it didn't entierly solved the issue as the mechanics never worked with union type array|object before. Is your mechanic a little bit more generic and only changing the callmap will be enough?
Hi there!
I noticed some weeks ago that PHP is allowing objects in array_walk and array_walk_recursive internal functions.
Therefore, the error
InvalidArgument - file.php:line:col - Argument 1 of array_walk expects array<array-key, mixed>, stdClass provided
should not be triggered.See: https://psalm.dev/r/0aeeb09741
I already helped in providing a PR for PHPStan which had the same issue as yours: phpstan/phpstan-src#573. The PR was incomplete but still, the feature to allow objects in such function was accepted
I don't know yet how you're referencing internal PHP functions, but if this is something like PHPStan, I could probably provide you a PR for that.
Have a nice day.
Regards,
The text was updated successfully, but these errors were encountered: