Skip to content

fix: preserve assert_return generic type#84

Merged
simPod merged 1 commit into
0.2.xfrom
fix/assert-return-generic-type
Apr 23, 2026
Merged

fix: preserve assert_return generic type#84
simPod merged 1 commit into
0.2.xfrom
fix/assert-return-generic-type

Conversation

@simPod
Copy link
Copy Markdown
Collaborator

@simPod simPod commented Apr 23, 2026

Summary

  • fix the assert_return phpdoc generic contract so static analysis preserves TValue
  • keep the runtime behavior unchanged while making phpstan infer the returned asserted type

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.93%. Comparing base (c810866) to head (3bb0c86).
⚠️ Report is 1 commits behind head on 0.2.x.

Additional details and impacted files
@@           Coverage Diff           @@
##            0.2.x      #84   +/-   ##
=======================================
  Coverage   85.93%   85.93%           
=======================================
  Files           6        6           
  Lines          64       64           
=======================================
  Hits           55       55           
  Misses          9        9           

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

@simPod simPod force-pushed the fix/assert-return-generic-type branch from e4cfa3f to 3bb0c86 Compare April 23, 2026 10:13
@simPod simPod merged commit ddc699e into 0.2.x Apr 23, 2026
9 checks passed
@simPod simPod deleted the fix/assert-return-generic-type branch April 23, 2026 10:14
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