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

parameter with ? triggers error where it should not #1997

lyrixx opened this Issue Mar 14, 2019 · 2 comments


None yet
2 participants
Copy link

lyrixx commented Mar 14, 2019

Summary of a problem or a feature request

PHPStan should not complain when we don't pass a parameter to a fonction that has the following typehint ?string

Code snippet that reproduces the problem

function hello(?string $string)


Expected output

nothing :)


This comment has been minimized.

Copy link

ondrejmirtes commented Mar 14, 2019

? means nullable, not optional. Such code crashes:


This comment has been minimized.

Copy link

lyrixx commented Mar 14, 2019

Oups, indeed 👍 Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.