-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
return type has no value type specified in iterable type array
if a docbock goes after php8 attributes
#6502
Comments
Unfortunately this is an issue in nikic/PHP-Parser: nikic/PHP-Parser#762 Recently I've got an idea how to work around it, stay tuned :) |
Some news about this issue and your idea @ondrejmirtes? |
No need to ask - unless the linked issue is solved, there's no update. |
Duplicate of #4633 |
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. |
Bug report
By RFC (https://wiki.php.net/rfc/attributes_v2) there's no difference in attributes and docblock order.
But if I put a docblock after an attribute, I get
return type has no value type specified in iterable type array
here, as if there's no this docblock:https://phpstan.org/r/aa3b06c9-7292-47e6-a986-8ccf904890ef
If I put the docblock before an attribute it works as expected:
https://phpstan.org/r/9fda8bec-7a0b-4cbc-8fb2-49d24172429b
Code snippet that reproduces the problem
https://phpstan.org/r/aa3b06c9-7292-47e6-a986-8ccf904890ef
Expected output
No errors.
Did PHPStan help you today? Did it make you happy in any way?
I love PHPStan <3
The text was updated successfully, but these errors were encountered: