Skip to content

refactor(debug)!: consume the php-forge/debug 0.2 presenter value objects. - #12

Merged
terabytesoftw merged 1 commit into
mainfrom
refactor/add-presenter-value-objects
Sep 16, 2026
Merged

terabytesoftw merged 1 commit into
mainfrom
refactor/add-presenter-value-objects

Conversation

@terabytesoftw

Copy link
Copy Markdown
Contributor

Pull Request

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bugfix (non-breaking change that fixes an issue)
  • CI/build configuration
  • Documentation update
  • New feature (non-breaking change that adds functionality)
  • Refactoring (no functional changes)

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 04cffdc4-8684-4eea-ba0c-8171f8e83375

📥 Commits

Reviewing files that changed from the base of the PR and between 3025bb5 and c7ecf66.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • composer.json
  • tests/Debug/VitePanelTest.php
  • tests/Debug/fixtures/chunks.view.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
🧰 Additional context used
🪛 PHPMD (2.15.0)
tests/Debug/VitePanelTest.php

[error] Avoid using static access to class '\PHPForge\Vite\Tests\Provider\VitePanelProvider' in method 'testChunksAndMixedModesRemainProviderOwned'. (undefined)

(StaticAccess)


[error] 39-485: The class VitePanelTest has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13. (undefined)

(CouplingBetweenObjects)

🔇 Additional comments (5)
composer.json (1)

34-34: LGTM!

CHANGELOG.md (1)

8-10: LGTM!

tests/Debug/VitePanelTest.php (2)

235-259: LGTM!

Also applies to: 343-358, 440-445, 479-484


294-301: 🗄️ Data Integrity & Integration

The fixture set contains only one table block, in chunks.view.json, and that block already includes filterable after collapsible. No other view fixture requires this key. No current fixture has a zero-based contiguous styles map that encodes as an array, so the related concern does not identify a failing case.

tests/Debug/fixtures/chunks.view.json (1)

209-210: LGTM!


📝 Summary

Summary by CodeRabbit

  • Breaking Changes
    • Updated the debug panel integration to use the newer php-forge/debug 0.2 presenter format.
    • Build chunk information is now always expanded and cannot be filtered.
  • Chores
    • Updated the upcoming release version to 0.4.0.
  • Tests
    • Updated debug panel validation to reflect the new presenter format and verify metadata, summaries, toolbars, and unavailable inspection states.

Walkthrough

The project now targets php-forge/debug 0.2. Debug panel tests consume presenter objects, convert views to fixture-compatible arrays, and include the table’s non-filterable state. The changelog records the 0.4.0 breaking refactor.

Changes

Debug presenter migration

Layer / File(s) Summary
Dependency and release metadata
composer.json, CHANGELOG.md
The Composer constraint now targets php-forge/debug ^0.2. The changelog updates the development release to 0.4.0 and records the breaking debug refactor.
Presenter object test adaptation
tests/Debug/VitePanelTest.php, tests/Debug/fixtures/chunks.view.json
Tests use presenter object properties and concrete presenter types. Helper methods serialize blocks, inlines, metrics, fields, rows, and styles into fixture-compatible arrays. The chunks table is marked filterable: false.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to c7ecf

The dependency migration and corresponding test fixtures appear internally consistent and ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 1 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the breaking debug refactor and the updated php-forge/debug 0.2 presenter value objects.
Description check ✅ Passed The description marks the change as breaking, which matches the pull request objective and changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 1 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/add-presenter-value-objects

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

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #12   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       310       310           
===========================================
  Files             22        22           
  Lines            813       813           
===========================================
  Hits             813       813           

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

@terabytesoftw
terabytesoftw merged commit 7ee2527 into main Sep 16, 2026
43 checks passed
@terabytesoftw
terabytesoftw deleted the refactor/add-presenter-value-objects branch September 16, 2026 16:48
@terabytesoftw terabytesoftw added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Sep 16, 2026
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