Fix FileVisitor issues with wrong class detection#508
Fix FileVisitor issues with wrong class detection#508hgraca wants to merge 1 commit intophparkitect:mainfrom
Conversation
e172b7e to
0d65be6
Compare
|
Hey @hgraca, thank you for reporting that 🙇. I guess this depends on the new |
|
#510 should fix the problem |
|
@micheleorselli thank you for fixing the bug, is this PR still worth merging or shall I close it? |
It seems the php parser is using phpdocs and deciding that something like /** * @return array<int, string|int> */ is a class with FQCN `My\Namespace\array<int, string|int>` which then ofc fails to create a FullyQualifiedClassName.
|
@micheleorselli I fixed the merge conflicts and force pushed. |
0d65be6 to
9376332
Compare
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
============================================
- Coverage 97.75% 97.53% -0.22%
- Complexity 615 619 +4
============================================
Files 80 80
Lines 1778 1786 +8
============================================
+ Hits 1738 1742 +4
- Misses 40 44 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @hgraca thank you for testing it! Based on the error it seems this is related to something different rather than the |
|
I'm trying to reproduce it but with no luck, would you mind sharing the snippet of the code causing problems? thanks! |
|
I finally had some time to look into what situations still give problems, I found only this: https://github.com/ramsey/uuid/blob/4.x/src/Uuid.php#L232-L234 We updated our project from php8.2 to 8.4 this week, including some libraries ofc so I guess that's why this is not exactly the same issue as before, but at the root it seems to be the same, it looks like it interprets Unfortunately I dont know what shoulod be done to solve this on phparkitect side, except for what is in this PR already :( let me know if I can be of any further assistance. |
|
I was able to reproduce it, this #517 should fix it |
|
@hgraca we can close this issue? |



It seems the php parser is using phpdocs and deciding that
something like
/**
is a class with FQCN
My\Namespace\array<int, string|int>which then ofc fails to create a FullyQualifiedClassName.