Skip to content

Make the Html::clean() test data providers static - #266

Merged
LukeTowers merged 1 commit into
developfrom
fix/static-data-providers
Oct 23, 2026
Merged

LukeTowers merged 1 commit into
developfrom
fix/static-data-providers

Conversation

@LukeTowers

@LukeTowers LukeTowers commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

PHPUnit 11 rejects a non-static data provider with an error, so unsafeAttributeProvider() and safeMarkupProvider() from #264 break CI on wip/1.3 (#207) as soon as develop is merged in:

1) HtmlBuilderTest::testCleanRemovesUnsafeAttributes
   Data Provider method HtmlBuilderTest::unsafeAttributeProvider() is not static
2) HtmlBuilderTest::testCleanPreservesSafeMarkup
   Data Provider method HtmlBuilderTest::safeMarkupProvider() is not static

The other seven providers in the suite were already made static on wip/1.3, which is why only these two fail. Static providers work unchanged under PHPUnit 9, so this fixes both branches from one commit and keeps the merge conflict-free.

Verified: full suite on develop (PHPUnit 9.6.38) 907 tests OK; #207's head merged with this commit (PHPUnit 11.5.57) 968 tests OK, down from 2 errors. #207 needs no change of its own — CI tests the merge with base, so re-running its workflow after this lands picks it up.

Summary by CodeRabbit

  • Tests
    • Updated the test suite’s data provider declarations. The test cases remain unchanged, and this update does not alter any user-facing functionality or application behavior.

PHPUnit 11 rejects a non-static data provider with an error, so `unsafeAttributeProvider()` and `safeMarkupProvider()` from #264 break CI on wip/1.3 (#207) as soon as develop is merged in. The other seven providers in the suite were already made static there. Static providers work unchanged under PHPUnit 9, so the full suite stays green on develop as well.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 52ee849d-29fc-4c33-8423-cbc927798e5a
📥 Commits

Reviewing files that changed from the base of the PR and between d6e5607 and d7fd848.

📒 Files selected for processing: 1
  • tests/Html/HtmlBuilderTest.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Two HTML builder test data-provider methods are now static. Their test cases are unchanged.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to d7fd8

This compatibility-only test change presents no identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: making the Html::clean() test data providers static for PHPUnit compatibility.
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.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • 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

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

@LukeTowers
LukeTowers merged commit 79b0c53 into develop Oct 23, 2026
13 checks passed
@LukeTowers
LukeTowers deleted the fix/static-data-providers branch October 23, 2026 04:54
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.

1 participant