Skip to content

Ignore union types in dockblock definitions #510

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

Merged
merged 2 commits into from
May 21, 2025

Conversation

micheleorselli
Copy link
Member

@micheleorselli micheleorselli commented May 20, 2025

This should fix #509. The updated implementation ignores any type defined in docblock which is not a class fqcn

NB: support for union types is still missing we are going to tackle it in separate PR(s)

Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.47%. Comparing base (fbc5e97) to head (58b9b73).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #510      +/-   ##
============================================
+ Coverage     97.30%   97.47%   +0.17%     
- Complexity      629      631       +2     
============================================
  Files            80       80              
  Lines          1780     1785       +5     
============================================
+ Hits           1732     1740       +8     
+ Misses           48       45       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@micheleorselli micheleorselli marked this pull request as ready for review May 20, 2025 21:05
@micheleorselli micheleorselli requested a review from fain182 May 20, 2025 21:06
@micheleorselli micheleorselli force-pushed the fix_union_type_docblock branch from c41acde to 58b9b73 Compare May 21, 2025 07:47
Copy link

@micheleorselli micheleorselli merged commit 556c3f1 into main May 21, 2025
35 checks passed
@micheleorselli micheleorselli deleted the fix_union_type_docblock branch May 21, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP parser interprets docblock return type like an array as a class
1 participant