Skip to content

Rename $options parameter to $attributes#269

Merged
vjik merged 2 commits intomasterfrom
rename-options
Mar 16, 2026
Merged

Rename $options parameter to $attributes#269
vjik merged 2 commits intomasterfrom
rename-options

Conversation

@vjik
Copy link
Member

@vjik vjik commented Mar 15, 2026

Q A
Is bugfix?
New feature?
Breaks BC? ✔️
Fix #247

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a3d9d65) to head (b52676e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #269   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       827       827           
===========================================
  Files             89        89           
  Lines           2225      2225           
===========================================
  Hits            2225      2225           

☔ 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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes terminology in the Html helper API by renaming the $options parameter to $attributes for CSS class/style helper methods (a BC break impacting named-argument callers), aligning with broader attribute naming across the codebase.

Changes:

  • Renamed the by-ref parameter in Html::addCssClass(), Html::removeCssClass(), Html::addCssStyle(), and Html::removeCssStyle() from $options to $attributes.
  • Updated related documentation (inline docs, upgrade notes, changelog) to reflect the rename and BC impact.
  • Updated unit tests to use $attributes variable naming for these helpers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/Html.php Renames method parameters and updates docblocks/examples to $attributes.
tests/HtmlTest.php Updates tests’ variable/parameter naming to match $attributes.
UPGRADE.md Documents the BC break for named-argument callers.
CHANGELOG.md Records the change under the upcoming release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@vjik vjik requested a review from a team March 15, 2026 16:58
@vjik vjik added the status:code review The pull request needs review. label Mar 15, 2026
@vjik vjik merged commit 4f5d9f1 into master Mar 16, 2026
25 of 26 checks passed
@vjik vjik deleted the rename-options branch March 16, 2026 06:33
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename $options to $attributes in Html::addCssClass()

3 participants