Skip to content

Isolate Fieldset object warnings from caller-owned state - #59

Merged
joshbruce merged 1 commit into
mainfrom
cp-joshbruce-fieldset-warning-isolation
Oct 15, 2026
Merged

joshbruce merged 1 commit into
mainfrom
cp-joshbruce-fieldset-warning-isolation

Conversation

@joshbruce

Copy link
Copy Markdown
Member

Fieldset now clones caller-supplied PropertyInterface warnings and renders them locally, matching the existing controls' clone-and-render pattern. Generated warning IDs no longer mutate the original warning object. String warning markup and the boundary around arbitrary children remain unchanged; callers still own member-control associations.

Added regression coverage for unchanged caller state, stable repeated rendering with one warning, warning reuse across fieldsets and a text input with independent IDs, string/object markup, empty warnings, and unchanged arbitrary child controls. Documented the warning behavior and association boundary in README.md.

Validation on PHP 8.5.2:

  • composer test -- --filter FieldsetTest before the fix: failed as expected (2 mutation failures).
  • composer test -- --filter 'FieldsetTest|ControlGuidanceTest': passed (82 tests, 1422 assertions).
  • composer production: passed (PHPCS, PHPStan, and full PHPUnit suite: 200 tests, 1832 assertions).
  • git --no-pager diff --check and git --no-pager diff --cached --check: passed.

List of issues fixed

Fixes #58

Fixes #58

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@joshbruce joshbruce mentioned this pull request Oct 15, 2026
@joshbruce
joshbruce merged commit afbca8b into main Oct 15, 2026
2 checks passed
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.

Isolate Fieldset object warnings from caller-owned state

1 participant