Skip to content

Collect types declared in @throws tags and consider them dependencies (1/2) #507

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 6 commits into from
May 18, 2025

Conversation

micheleorselli
Copy link
Member

@micheleorselli micheleorselli commented May 15, 2025

This first step is a refactoring to simplify DocblockResolver introducing some new support classes

One thing I noticed during this refactoring is even in case of multiple types defined, like

/**
* @Assert\Blank
* @var Foo
*/ 
public $foo

we collect just one. Is that intended? do we want to address it in some way? We could support it using union types
cc @fain182 @AlessandroMinoccheri?

Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 92.64706% with 5 lines in your changes missing coverage. Please review.

Project coverage is 97.26%. Comparing base (26417fe) to head (a8e518b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Analyzer/DocblockTypesResolver.php 90.62% 3 Missing ⚠️
src/Analyzer/Docblock.php 94.11% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #507      +/-   ##
============================================
- Coverage     97.31%   97.26%   -0.05%     
  Complexity      624      624              
============================================
  Files            78       79       +1     
  Lines          1748     1758      +10     
============================================
+ Hits           1701     1710       +9     
- Misses           47       48       +1     

☔ 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.

Copy link

@micheleorselli micheleorselli changed the title Collect throws deps Collect types declared in @throws tags and consider them dependencies (1/2) May 15, 2025
@AlessandroMinoccheri
Copy link
Member

@micheleorselli for me, we should fix it in another PR, or at least try to understand deeper the context.

Copy link
Member

@AlessandroMinoccheri AlessandroMinoccheri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@micheleorselli micheleorselli marked this pull request as ready for review May 18, 2025 13:23
@micheleorselli micheleorselli merged commit 55b9163 into main May 18, 2025
32 of 34 checks passed
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.

2 participants