Skip to content

fix(attribute): Move HasDisabled trait to UIAwesome\Html\Attribute namespace and update related imports accordingly.#76

Merged
terabytesoftw merged 2 commits intomainfrom
fix_mini_26
Feb 5, 2026
Merged

fix(attribute): Move HasDisabled trait to UIAwesome\Html\Attribute namespace and update related imports accordingly.#76
terabytesoftw merged 2 commits intomainfrom
fix_mini_26

Conversation

@terabytesoftw
Copy link
Contributor

Pull Request

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

…` namespace and update related imports accordingly.
@terabytesoftw terabytesoftw added the bug Something isn't working label Feb 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Reorganized internal attribute namespaces and aligned test references to match the new structure, improving maintainability and test consistency.
  • Documentation
    • Added an entry to the changelog describing the internal namespace updates.

Walkthrough

Moved the HasDisabled trait from UIAwesome\Html\Attribute\Form to UIAwesome\Html\Attribute. Updated tests, provider, and CHANGELOG to reference the new namespace and import paths.

Changes

Cohort / File(s) Summary
Trait Namespace Relocation
src/HasDisabled.php
Namespace changed from UIAwesome\Html\Attribute\FormUIAwesome\Html\Attribute. No logic changes.
Test Updates
tests/HasDisabledTest.php, tests/Provider/DisabledProvider.php
Updated test namespaces and import paths to match relocated trait and provider namespace.
Documentation
CHANGELOG.md
Added entry noting the trait relocation under 0.5.3 Under development.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇 I hopped from Form to Attribute's light,
A tiny trait, now set just right,
Imports fixed and tests aligned,
I twitch my nose and leave behind —
A changelog bloom, a code-bunny's delight! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: moving the HasDisabled trait to a different namespace and updating imports accordingly, which matches the primary objective of the PR.
Description check ✅ Passed The description provides relevant context about the PR being a bugfix with no breaking changes, which relates to the changeset's intent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_mini_26

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6eb823d and 99741da.

📒 Files selected for processing (1)
  • tests/Provider/DisabledProvider.php
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:25.443Z
Learning: In the ui-awesome/html-attribute repository, when files are moved from the ui-awesome/html-core package (or other packages), the original copyright year in the file headers should be preserved rather than updated to the current year, as these represent the year the code was originally created.
📚 Learning: 2026-01-09T16:05:15.502Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:15.502Z
Learning: Preserve the original copyright year in file headers when moving PHP source files between packages within the ui-awesome repositories (e.g., from ui-awesome/html-core to ui-awesome/html-attribute). Do not update the header year to the current year; keep the original creation year as stated in the header. This applies to all PHP files throughout the repo that are moved between packages.

Applied to files:

  • tests/Provider/DisabledProvider.php
⏰ 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). (13)
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-windows-2022
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
🔇 Additional comments (2)
tests/Provider/DisabledProvider.php (2)

15-59: LGTM! Test data provider is well-structured.

The test cases comprehensively cover the disabled attribute behavior: setting true/false, handling null, replacing existing values, and unsetting with null. The PHPStan return type annotation accurately reflects the data structure.


5-8: Namespace and docblock changes are correct and consistent with the PR objective.

The namespace change from UIAwesome\Html\Attribute\Tests\Provider\Form to UIAwesome\Html\Attribute\Tests\Provider and the docblock reference update correctly reflect the relocation of HasDisabled out of the Form sub-namespace.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

Copy link

@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: 0

Caution

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

⚠️ Outside diff range comments (1)
tests/Provider/DisabledProvider.php (1)

5-9: ⚠️ Potential issue | 🟡 Minor

Update docblock reference to new test namespace.

The @see target still points to UIAwesome\Html\Attribute\Tests\Form\HasDisabledTest, which no longer exists after the namespace move.

Proposed fix
- * Data provider for {`@see` \UIAwesome\Html\Attribute\Tests\Form\HasDisabledTest} test cases.
+ * Data provider for {`@see` \UIAwesome\Html\Attribute\Tests\HasDisabledTest} test cases.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7500438 and 6eb823d.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • src/HasDisabled.php
  • tests/HasDisabledTest.php
  • tests/Provider/DisabledProvider.php
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:25.443Z
Learning: In the ui-awesome/html-attribute repository, when files are moved from the ui-awesome/html-core package (or other packages), the original copyright year in the file headers should be preserved rather than updated to the current year, as these represent the year the code was originally created.
📚 Learning: 2026-01-09T16:05:15.502Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:15.502Z
Learning: Preserve the original copyright year in file headers when moving PHP source files between packages within the ui-awesome repositories (e.g., from ui-awesome/html-core to ui-awesome/html-attribute). Do not update the header year to the current year; keep the original creation year as stated in the header. This applies to all PHP files throughout the repo that are moved between packages.

Applied to files:

  • src/HasDisabled.php
  • tests/HasDisabledTest.php
  • tests/Provider/DisabledProvider.php
📚 Learning: 2026-01-09T16:05:25.443Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:25.443Z
Learning: In the ui-awesome/html-attribute repository, when files are moved from the ui-awesome/html-core package (or other packages), the original copyright year in the file headers should be preserved rather than updated to the current year, as these represent the year the code was originally created.

Applied to files:

  • CHANGELOG.md
🧬 Code graph analysis (1)
tests/HasDisabledTest.php (1)
tests/Provider/DisabledProvider.php (1)
  • DisabledProvider (15-60)
⏰ 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). (10)
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: easy-coding-standard / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: composer-require-checker / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: linter / Super Linter
🔇 Additional comments (3)
CHANGELOG.md (1)

49-49: Changelog entry aligns with the namespace move.

Looks correct and consistent with the PR scope.

src/HasDisabled.php (1)

5-7: Namespace update looks consistent.

No functional changes; aligns with the trait relocation.

tests/HasDisabledTest.php (1)

5-10: Test namespace/import updates are correct.

Imports now match the relocated trait and provider.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@terabytesoftw terabytesoftw merged commit 302c992 into main Feb 5, 2026
47 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_26 branch February 5, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant