Skip to content

Conversation

mitelg
Copy link
Contributor

@mitelg mitelg commented Nov 12, 2024

Hey there,

recently I found that the assertIsList method does not tell PHPStan correctly that the variable is of type list afterwards. This PR is fixing that.

I wanted to add this to 10.5 branch first, but I saw, that there are no phpstan-assert annotations at all, so I was not sure, if that was reasonable.

This is my first contribution here, so I hope, I did everything correct. Not sure, if I need a test for this

See phpstan/phpstan-phpunit#212 for reference

Copy link
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

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

lgtm - thanks

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.73%. Comparing base (d81cfde) to head (7151a99).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6027   +/-   ##
=========================================
  Coverage     94.73%   94.73%           
  Complexity     6434     6434           
=========================================
  Files           697      697           
  Lines         20240    20240           
=========================================
  Hits          19174    19174           
  Misses         1066     1066           

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

@staabm
Copy link
Contributor

staabm commented Nov 16, 2024

just realized we need the same phpdoc on src/Framework/Assert/Functions.php, right?

@sebastianbergmann
Copy link
Owner

Cherry-picked into 11.4 and merged to 11.5 and main from there.

@mitelg mitelg deleted the fix/assert-is-list branch November 17, 2024 15:26
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.

3 participants