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?
to your account
Empty string and generics union type parameter does not accept an empty string.
''|class-string union type parameter accepts empty-string, but not with ''|class-string<T> parameter.
* @param ''|class-string<T> $p
* @template T of object
function ng($p): void
Parameter #1 $p of function ng expects class-string<>, string given.
It always helps. Arigato!
The text was updated successfully, but these errors were encountered:
@koriym After the latest push in 1.8.x, PHPStan now reports different result with your code snippet:
-19: Parameter #1 $p of function ng expects class-string<>, string given.
Sorry, something went wrong.
regression test incoming
added regression test for phpstan/phpstan#7562
Updated PHPStan to commit bd57fc59f4737188ce750f607f42d85e6d4aec37
phpstan/phpstan-src@9ec53eb added regression test for #7562 phpstan/phpstan-src@de67394 Optimize ConstantArrayType::isKeysSupersetOf() phpstan/phpstan-src@bd57fc5 Remove outdated comments
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Successfully merging a pull request may close this issue.