Skip to content

fix(mixin); Remove ui-awesome/html-interop from runtime dependencies and keep it as development-only dependency for local tooling/tests.#58

Merged
terabytesoftw merged 3 commits intomainfrom
feature_13
Feb 27, 2026
Merged

fix(mixin); Remove ui-awesome/html-interop from runtime dependencies and keep it as development-only dependency for local tooling/tests.#58
terabytesoftw merged 3 commits intomainfrom
feature_13

Conversation

@terabytesoftw
Copy link
Copy Markdown
Contributor

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️

…s and keep it as development-only dependency for local tooling/tests.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Tag methods now accept project-defined UnitEnum values (use your own enums for tag APIs).
  • Bug Fixes

    • Removed ui-awesome/html-interop from runtime dependencies and moved it to development-only.
  • Documentation

    • Added v0.5.0 upgrade guide with migration examples and a new InlineTag enum example.
    • Updated installation instructions, docs on tag enum contracts, and development notes.

Walkthrough

Moves ui-awesome/html-interop from runtime to dev-only dependency, updates docs and examples for 0.5.0, and changes tag-related trait signatures to use false|UnitEnum instead of unions of BlockInterface, InlineInterface, and VoidInterface.

Changes

Cohort / File(s) Summary
Documentation & Changelog
CHANGELOG.md, README.md, UPGRADE.md, docs/development.md
Bumps upcoming release to 0.5.0; adds upgrade/migration notes and examples; documents tag APIs now accept UnitEnum; updates README examples to use a project-defined InlineTag enum and adds an Upgrade Guide link.
Dependency Configuration
composer.json
Removes ui-awesome/html-interop from require and adds it to require-dev as ^0.4@dev.
Tag Trait Signatures
src/HasContainerCollection.php, src/HasPrefixCollection.php, src/HasSuffixCollection.php
Replaces interface unions with `false

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through changelogs, deft and spry,
Moved interop off to dev, waved it goodbye.
UnitEnum now leads the parade,
Examples tweaked, docs freshly made.
Tiny hop, big grin — ready to fly! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing ui-awesome/html-interop from runtime dependencies and moving it to development-only, which aligns with the actual changeset.
Description check ✅ Passed The description is related to the changeset, confirming it is a bugfix that breaks BC and addresses dependency management, which corresponds to the actual changes made.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature_13

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 and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8c03ec0) to head (c27dab2).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #58   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        55        55           
===========================================
  Files              8         8           
  Lines            168       168           
===========================================
  Hits             168       168           

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

@coderabbitai coderabbitai Bot added the dependencies Pull requests that update a dependency file label Feb 27, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/HasPrefixCollection.php (1)

221-240: 🧹 Nitpick | 🔵 Trivial

Docblock example references removed dependency.

Same issue as HasSuffixCollection: the usage example references \UIAwesome\Html\Interop\Inline::SPAN (line 226), which is now a dev-only dependency. Consider updating to use a project enum.

The PHPMD BooleanArgumentFlag warning is a false positive for the same reasons as noted in HasSuffixCollection.

📝 Suggested docblock update
     * Usage example:
     * ```php
-    * $component->prefixTag(\UIAwesome\Html\Interop\Inline::SPAN);
+    * $component->prefixTag(InlineTag::SPAN);
     * $component->prefixTag(false);
     * ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/HasPrefixCollection.php` around lines 221 - 240, Update the docblock
example in the prefixTag method to stop referencing the dev-only external enum
(\UIAwesome\Html\Interop\Inline::SPAN) and instead use the project enum (e.g.,
InlineTag::SPAN) used elsewhere in the codebase; update the example line in the
prefixTag docblock and, if appropriate, mirror the same docblock change applied
in HasSuffixCollection so both examples are consistent; leave the method
signature and behavior (prefixTag(false|UnitEnum $value = false): static)
unchanged and ignore the PHPMD BooleanArgumentFlag false positive as noted.
src/HasSuffixCollection.php (1)

221-240: 🧹 Nitpick | 🔵 Trivial

Docblock example references removed dependency.

The usage example in the docblock still references \UIAwesome\Html\Interop\Inline::SPAN (line 226), which is now a dev-only dependency. Consider updating the example to use a project enum like InlineTag::SPAN to match the README documentation.

Regarding the PHPMD BooleanArgumentFlag warning: this is a false positive. The false|UnitEnum union type is an intentional API design to allow disabling the tag wrapper, which is a valid use case for this fluent API.

📝 Suggested docblock update
     * Usage example:
     * ```php
-    * $component->suffixTag(\UIAwesome\Html\Interop\Inline::SPAN);
+    * $component->suffixTag(InlineTag::SPAN);
     * $component->suffixTag(false);
     * ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/HasSuffixCollection.php` around lines 221 - 240, Update the docblock
example in the suffixTag method to stop referencing the dev-only
\UIAwesome\Html\Interop\Inline enum and use the project enum instead (e.g.
InlineTag::SPAN) so docs/README match; leave the method signature and behavior
unchanged (suffixTag(false|UnitEnum $value = false): static) because the
false|UnitEnum union is an intentional API design and can be ignored as a PHPMD
BooleanArgumentFlag false positive. Ensure the docblock example shows both
enabling with InlineTag::SPAN and disabling with false, and keep this change
localized to the suffixTag docblock.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/HasPrefixCollection.php`:
- Around line 221-240: Update the docblock example in the prefixTag method to
stop referencing the dev-only external enum
(\UIAwesome\Html\Interop\Inline::SPAN) and instead use the project enum (e.g.,
InlineTag::SPAN) used elsewhere in the codebase; update the example line in the
prefixTag docblock and, if appropriate, mirror the same docblock change applied
in HasSuffixCollection so both examples are consistent; leave the method
signature and behavior (prefixTag(false|UnitEnum $value = false): static)
unchanged and ignore the PHPMD BooleanArgumentFlag false positive as noted.

In `@src/HasSuffixCollection.php`:
- Around line 221-240: Update the docblock example in the suffixTag method to
stop referencing the dev-only \UIAwesome\Html\Interop\Inline enum and use the
project enum instead (e.g. InlineTag::SPAN) so docs/README match; leave the
method signature and behavior unchanged (suffixTag(false|UnitEnum $value =
false): static) because the false|UnitEnum union is an intentional API design
and can be ignored as a PHPMD BooleanArgumentFlag false positive. Ensure the
docblock example shows both enabling with InlineTag::SPAN and disabling with
false, and keep this change localized to the suffixTag docblock.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 056daad and 2847841.

⛔ Files ignored due to path filters (2)
  • docs/svgs/features-mobile.svg is excluded by !**/*.svg
  • docs/svgs/features.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • CHANGELOG.md
  • README.md
  • UPGRADE.md
  • composer.json
  • docs/development.md
  • src/HasContainerCollection.php
  • src/HasPrefixCollection.php
  • src/HasSuffixCollection.php
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: linter / Super Linter
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/HasSuffixCollection.php

[error] 234-234: The method suffixTag has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation. (undefined)

(BooleanArgumentFlag)

src/HasPrefixCollection.php

[error] 234-234: The method prefixTag has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation. (undefined)

(BooleanArgumentFlag)

🔇 Additional comments (9)
CHANGELOG.md (1)

3-5: LGTM! Changelog entry properly documents the breaking change.

The version bump to 0.5.0 correctly reflects the breaking change nature of this PR. The entry clearly describes the dependency scope change.

README.md (2)

153-169: LGTM! Clear documentation of the UnitEnum-based tag API.

The example effectively demonstrates how users can define their own project enums for tag configuration, removing the runtime dependency on ui-awesome/html-interop while maintaining type safety.


40-40: Installation and documentation links properly updated.

The version constraint and upgrade guide link are correctly updated to reflect the 0.5.0 release.

Also applies to: 202-202

UPGRADE.md (1)

1-39: LGTM! Comprehensive upgrade guide for the breaking change.

The upgrade documentation clearly explains:

  • The runtime dependency removal
  • The affected APIs with the new false|UnitEnum signature
  • A practical migration example from interop types to project enums

This will help users migrate smoothly to version 0.5.0.

src/HasContainerCollection.php (1)

34-34: LGTM! Type signature correctly updated to false|UnitEnum.

The property and method signatures are consistently updated to use the more flexible UnitEnum type, allowing users to define their own tag enums without depending on ui-awesome/html-interop at runtime.

Also applies to: 159-165

src/HasSuffixCollection.php (1)

36-36: LGTM! Type changes consistent with the PR-wide migration.

The suffixTag property and getter are correctly updated to false|UnitEnum.

Also applies to: 100-103

src/HasPrefixCollection.php (1)

36-36: LGTM! Type changes consistent with the PR-wide migration.

The prefixTag property and getter are correctly updated to false|UnitEnum.

Also applies to: 100-103

docs/development.md (1)

5-11: LGTM! Clear documentation of the UnitEnum contract.

The new section effectively explains:

  • The UnitEnum shared contract for tag APIs
  • The removal of ui-awesome/html-interop as a runtime dependency
  • Guidance for projects that still want to use interop enums

This complements the UPGRADE.md migration guide well.

composer.json (1)

18-18: > Likely an incorrect or invalid review comment.

@coderabbitai coderabbitai Bot added the bug Something isn't working label Feb 27, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/HasSuffixCollection.php`:
- Around line 225-227: Update the docblock example in HasSuffixCollection (the
usage of suffixTag in the PHPDoc) to reference Inline::SPAN instead of the
malformed and removed \UIAwesome\Html\InteropInline::SPAN; locate the example
where suffixTag(...) is shown (matching the suffixTag method examples) and
replace the fully-qualified/misspelled interop reference with the simpler
Inline::SPAN to match HasPrefixCollection's example and current runtime
dependencies.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2847841 and 6ba6b02.

📒 Files selected for processing (2)
  • src/HasPrefixCollection.php
  • src/HasSuffixCollection.php
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: easy-coding-standard / PHP 8.5-ubuntu-latest
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: linter / Super Linter
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/HasSuffixCollection.php

[error] 234-234: The method suffixTag has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation. (undefined)

(BooleanArgumentFlag)

src/HasPrefixCollection.php

[error] 234-234: The method prefixTag has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation. (undefined)

(BooleanArgumentFlag)

🔇 Additional comments (3)
src/HasPrefixCollection.php (2)

36-36: Type signature changes look correct.

The migration from concrete interfaces (BlockInterface|InlineInterface|VoidInterface) to UnitEnum is appropriate for removing the runtime dependency on ui-awesome/html-interop. The UnitEnum type is PHP's built-in interface that all enums implement, providing sufficient type safety while allowing flexibility for consumers to define their own tag enums.

Also applies to: 98-103


234-234: PHPMD boolean flag warning is a false positive for this pattern.

The false|UnitEnum union type is a deliberate design choice to allow disabling the tag element. Unlike a general bool flag that toggles behavior, false here is a sentinel value meaning "no tag" while UnitEnum represents a valid tag. This is a common immutable API pattern and not a true SRP violation.

src/HasSuffixCollection.php (1)

36-36: Type signature changes are consistent with the prefix trait.

The false|UnitEnum type for $suffixTag and the corresponding getter correctly mirrors the changes in HasPrefixCollection.php.

Also applies to: 98-103

Comment thread src/HasSuffixCollection.php
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/HasSuffixCollection.php`:
- Line 234: PHPMD flags the boolean-like parameter in method
suffixTag(false|UnitEnum $value = false) as a "boolean flag" but here false is a
semantic "disabled" sentinel; to silence the analyzer and document intent, add a
docblock for suffixTag explaining that passing false disables the suffix tag and
annotate the parameter type (false|UnitEnum) and either add a PHPMD suppression
annotation (e.g., `@SuppressWarnings`(PHPMD.BooleanArgumentFlag)) or a brief
comment describing the semantic use of false so reviewers and static tools
understand this is intentional.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ba6b02 and c27dab2.

📒 Files selected for processing (1)
  • src/HasSuffixCollection.php
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-windows-2022
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: easy-coding-standard / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: composer-require-checker / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/HasSuffixCollection.php

[error] 234-234: The method suffixTag has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation. (undefined)

(BooleanArgumentFlag)

🔇 Additional comments (2)
src/HasSuffixCollection.php (2)

36-36: LGTM!

The property type change to false|UnitEnum correctly implements the PR objective of removing the interop package dependency while maintaining the ability to disable the tag with false.


98-103: LGTM!

The getter return type and docblock are correctly updated to match the new false|UnitEnum property type.

Comment thread src/HasSuffixCollection.php
@terabytesoftw terabytesoftw merged commit 1c65697 into main Feb 27, 2026
49 checks passed
@terabytesoftw terabytesoftw deleted the feature_13 branch February 27, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant