Skip to content

Fix calls for PHP < 8.1 in ReleaseControllerTest - #21130

Merged
terabytesoftw merged 3 commits into
yiisoft:masterfrom
terabytesoftw:fix/call-php810releasecontrollertest
Oct 29, 2026
Merged

terabytesoftw merged 3 commits into
yiisoft:masterfrom
terabytesoftw:fix/call-php810releasecontrollertest

Conversation

@terabytesoftw

@terabytesoftw terabytesoftw commented Oct 29, 2026 •

Copy link
Copy Markdown
Member
Q A
Is bugfix? ✔️
New feature? ❌
Breaks BC? ❌

Summary by Sourcery

Bug Fixes:

  • Make reflection-based controller tests compatible with PHP versions before and after 8.1.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Tests
    • Updated test handling across supported PHP versions.
    • Existing changelog behavior and test expectations remain unchanged.
    • No changes to the application’s user-facing functionality or changelog output.

Four reflection-based tests now call setAccessible(true) only when PHP_VERSION_ID is below 80100. The method calls and assertions remain unchanged.

Changes: Reflection Test Compatibility

Layer / File(s) Summary
Version-gated reflection access
tests/framework/ReleaseControllerTest.php
The four tests call setAccessible(true) only on PHP versions earlier than 8.1. Their existing method calls and assertions remain unchanged.

Suggested labels: status:code review

Priority: Low

Change: Other

Merge Risk: Minimal · up to 28b23

The test-only compatibility change presents no identified merge-blocking risk and is ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title identifies the affected test and the PHP version compatibility fix. It accurately describes the main change, although it does not mention PHP 8.1 and later.
Description check Passed The description explains that the reflection-based controller tests need compatibility fixes for PHP versions before and after 8.1. This directly relates to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the version gate,
Four tests proceed without delay.
Before eight-one, access is set,
After that, the calls stay the same.
The changelog tests hop on their way.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the type:bug Bug label Oct 29, 2026
@terabytesoftw terabytesoftw removed the type:bug Bug label Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.87%. Comparing base (f50a1be) to head (28b23b0).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #21130   +/-   ##
=========================================
  Coverage     81.87%   81.87%           
  Complexity    11562    11562           
=========================================
  Files           374      374           
  Lines         30314    30314           
=========================================
  Hits          24820    24820           
  Misses         5494     5494           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot added the status:code review The pull request needs review. label Oct 29, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@terabytesoftw
terabytesoftw merged commit 697590d into yiisoft:master Oct 29, 2026
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review. type:test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants