We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reproducer: https://psalm.dev/r/db0313ec1b
function expects array{name?: string} but doesn't report any errors when undefined key is sent. Is this by design?
array{name?: string}
undefined key
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @param array{name?: string} $data */ function test(array $data): void { print_r($data); } $data = [ 'undefined_key' => 'test', ]; test($data);
Psalm output (using commit 29a2162): No issues!
Sorry, something went wrong.
This is by design, but something we hope to improve. See #5299.
No branches or pull requests
Reproducer: https://psalm.dev/r/db0313ec1b
Use case:
function expects
array{name?: string}
but doesn't report any errors whenundefined key
is sent. Is this by design?The text was updated successfully, but these errors were encountered: