-
-
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
phpdoc not parsed in some cases starting with phpstan v1.3
#6253
Comments
This bug report is missing a link to reproduction on phpstan.org. It will most likely be closed after manual review. |
closing as I think it will be fixed in the next release thank to #6264 |
I don't think this is fixed and I can't reproduce it. Can you please create a small reproducing repository that shows this problem? Thanks. |
Did you tried with atk4/core repo directly? If yes, then it is probably fixed alredy. With phpstan v1.3.0, it is failing, repo script https://github.com/atk4/core/blob/3.1.0/.github/workflows/test-unit.yml#L68 , no special environment needed/used. |
I need a minimal reproducing code to see what's the reason and figure out the fix. I'm really busy, I'm relying on the bug reporters to provide those. It's their job if they want the problem fixed. |
I belive it has something to do with this ignore: https://github.com/atk4/core/blob/3.1.0/phpstan.neon.dist#L29 It seems with phpstan v1.3.0+, when the type from phpdoc can not be resolved, it is not parsed at all, IDK. On phpstan.org, I can not reproduce it, I tried https://phpstan.org/r/899d7388-997d-44a9-a857-f608f8429e93 . Maybe it has to do something with the autoloder/opcache fix (phpstan/phpstan-src@e30f446), IDK. |
I'll reopen if you provide what I'm asking for, thanks 😊 |
Ondřej, I tried my best to reproduce on phpstan.org, see post above, but I do not know what causes the issue thus I cannot provide it. I belive it is related to a) ignored unresolved type errors (which is correct and worked prior v1.3.0) b) modified autoloading/analysis of traits. |
Try to remove stuff from the repo until it's no longer showing the error, and go one step back to show the error, you'll end up with 2-3 files, commit them to a new repository - now I have something actionable to fix the problem... |
repro repo: https://github.com/atk4/core/tree/phpstan13issue_6253 there are 4 supersmall files in src/ dir, issue replicable also on different machine/Windows |
Nice, I'm gonna take a look 👍 |
What's the deal with |
That class is from |
You should rethink your project structure, because the |
Anyway, this is fixed: phpstan/phpstan-src@11176c7 |
thank you ❤️ |
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
https://github.com/atk4/core/runs/4665738136?check_suite_focus=true
phpdoc is present, before phpstan v1.3, there were no errors
https://github.com/atk4/core/blob/3.1.0/src/AppScopeTrait.php#L78
The text was updated successfully, but these errors were encountered: