phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

handle invalid parameter lists in ArgumentsNormalizer

Open staabm opened this issue 3 years ago • 2 comments

implement remaining details mentioned in https://github.com/phpstan/phpstan-src/pull/1305#issuecomment-1124874931

And similarly, if someone calls foo(1, 2) (named arguments were not used, but some required arguments are missing), we can also return null to prevent some nasty bugs in the extensions.

staabm avatar May 16 '22 16:05 staabm

I think I built this change as requested, but since extensions are not called anymore, we see a lot of test-failures.

most (?) of these errors relate to method/function calls, where 0 args are given.

.. will investigate

staabm avatar May 16 '22 16:05 staabm

It's not that straightforward because of $arg->unpack. Maybe we can freeze these efforts for now as ArgumentsNormalizer is good enough for now. I have more plans with it but it can wait :)

ondrejmirtes avatar May 17 '22 07:05 ondrejmirtes

Hi, I'm cleaning up old and stale PRs. Please send a new PR if you're still interested, thanks.

ondrejmirtes avatar Oct 16 '22 10:10 ondrejmirtes