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
Hi
followup to #2621
The InvalidArgument is still triggered if the constant array consists of constants defined in another class.
Demo: https://psalm.dev/r/9d3ee9ba8f
kind regards
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class Credentials { public const ALL = 'all'; public const OWN = 'own'; public const NONE = 'none'; } class Test { public const VALUES = [ Credentials::ALL, Credentials::OWN ]; } /** * @psalm-param 'all'|'own'|'none'|list<'all'|'own'|'none'> $value */ function test($value): void { print_r($value); } $array = [ Credentials::ALL, Credentials::OWN ]; test(Credentials::ALL); test([Credentials::ALL, Credentials::OWN]); test($array); test(Test::VALUES);
Psalm output (using commit 389af1b): ERROR: InvalidArgument - 32:6 - Argument 1 of test expects list<string(all)|string(none)|string(own)>|string(all)|string(none)|string(own), array{0: string(all), 1: string(own)} provided
Sorry, something went wrong.
d434f7f
No branches or pull requests
Hi
followup to #2621
The InvalidArgument is still triggered if the constant array consists of constants defined in another class.
Demo:
https://psalm.dev/r/9d3ee9ba8f
kind regards
The text was updated successfully, but these errors were encountered: