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,