Skip to content

Fix PHP transformer text color class validity#577

Merged
chubes4 merged 2 commits into
trunkfrom
fix/php-transformer-text-color-class-validity
Jul 7, 2026
Merged

Fix PHP transformer text color class validity#577
chubes4 merged 2 commits into
trunkfrom
fix/php-transformer-text-color-class-validity

Conversation

@chubes4

@chubes4 chubes4 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep the reserved WordPress preset color slug text as a custom color style instead of serializing it to textColor: text, which avoids core generating duplicate has-text-color classes.
  • Strip generated color support classes from source className when equivalent block color support attrs already own those classes.
  • Add regression coverage for Coffee/CV-style paragraph color support class validity.

Verification

  • php tests/unit/block-style-support-conversion.php
  • composer test
  • Transformer guard over Coffee, Artist, and CV fixtures confirmed duplicate_has_text_color=0 for all three.

AI assistance

  • AI assistance: Yes
  • Tool(s): openai/gpt-5.5 via OpenCode
  • Used for: Investigated SSI fixture-matrix Coffee residual evidence, identified the generic PHP transformer color-class validity issue, implemented the fix and regression tests, and ran local verification.

@chubes4 chubes4 merged commit 6ef9141 into trunk Jul 7, 2026
1 check passed
@chubes4 chubes4 deleted the fix/php-transformer-text-color-class-validity branch July 7, 2026 01:57
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