From 9be6da276adde40e16d0c46f67cc392de3ccc944 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 17 Sep 2026 17:19:41 -0300 Subject: [PATCH] build!: require `php-forge/debug` `^0.3`. --- CHANGELOG.md | 4 +++- composer.json | 2 +- src/Debug/VitePanel.php | 2 +- tests/Debug/ViteCollectorTest.php | 14 +------------- tests/Debug/VitePanelTest.php | 10 +--------- tests/Debug/fixtures/chunks.view.json | 6 ++---- tests/Debug/fixtures/development.view.json | 6 ++---- tests/Debug/fixtures/empty.view.json | 3 +-- tests/Debug/fixtures/mixed.view.json | 9 +++------ tests/Debug/fixtures/production.view.json | 6 ++---- tests/Debug/fixtures/unavailable.view.json | 6 ++---- tests/Debug/fixtures/unknown.view.json | 6 ++---- 12 files changed, 21 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab74010..274b9a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.4.1 Under development +## 0.5.0 Under development + +- build!: require `php-forge/debug` `^0.3`. ## 0.4.0 September 16, 2026 diff --git a/composer.json b/composer.json index e566c2a..d352938 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "require": { "php": ">=8.3", "ui-awesome/html": "^0.6", - "php-forge/debug": "^0.2", + "php-forge/debug": "^0.3", "psr/event-dispatcher": "^1.0" }, "require-dev": { diff --git a/src/Debug/VitePanel.php b/src/Debug/VitePanel.php index fe005b1..5f49995 100644 --- a/src/Debug/VitePanel.php +++ b/src/Debug/VitePanel.php @@ -81,7 +81,7 @@ public function present(array $data): PanelView } } - $view = $view->summary($count === 1 ? ' component' : ' components', $count)->active($count !== 0); + $view = $view->summary($count === 1 ? ' component' : ' components', $count); if ($count === 0) { return $view->emptyState( diff --git a/tests/Debug/ViteCollectorTest.php b/tests/Debug/ViteCollectorTest.php index 92eb206..6bd4bf2 100644 --- a/tests/Debug/ViteCollectorTest.php +++ b/tests/Debug/ViteCollectorTest.php @@ -6,7 +6,7 @@ use PHPForge\Vite\Asset\AssetCollection; use PHPForge\Vite\Configuration\{DevelopmentConfiguration, ProductionConfiguration}; -use PHPForge\Vite\Debug\{ViteCollector, VitePanel}; +use PHPForge\Vite\Debug\ViteCollector; use PHPForge\Vite\Development\InlineModuleProviderInterface; use PHPForge\Vite\Event\AssetsResolved; use PHPForge\Vite\Exception\ManifestNotFoundException; @@ -51,10 +51,6 @@ public function testCaptureIsNullOutsideTheCycleAndEmptyInsideIt(): void $collector->capture(), 'Observed empty capture, not missing.', ); - self::assertFalse( - (new VitePanel())->present(['components' => []])->isActive(), - 'An empty capture must not activate the panel.', - ); $collector->shutdown(); } @@ -96,10 +92,6 @@ public function testDevelopmentCaptureDescribesEveryResolutionInTheCycle(array $ $capture, 'Components must accumulate in resolution order.', ); - self::assertTrue( - (new VitePanel())->present($capture)->isActive(), - 'Captured components must activate the panel.', - ); $collector->shutdown(); } @@ -437,10 +429,6 @@ public function testProductionCaptureUsesTheResolvedManifestEvenAfterRemoval(): $collector->shutdown(); - self::assertTrue( - (new VitePanel())->present($capture)->isActive(), - 'A replayed capture must activate the panel.', - ); $collector->startup(); diff --git a/tests/Debug/VitePanelTest.php b/tests/Debug/VitePanelTest.php index b1da701..5bc4e5b 100644 --- a/tests/Debug/VitePanelTest.php +++ b/tests/Debug/VitePanelTest.php @@ -135,10 +135,6 @@ public function testMetadataAndEmptyCapture(): void $view = $panel->present(['components' => []]); - self::assertFalse( - $view->isActive(), - 'An empty capture must not activate navigation.', - ); self::assertSame( [], $view->toolbarMetrics(), @@ -156,10 +152,6 @@ public function testModeLabelAndGroupRemainProviderOwned(string $mode, string $l { $view = (new VitePanel())->present(['components' => VitePanelProvider::components($mode)]); - self::assertTrue( - $view->isActive(), - 'Captured components must activate the panel.', - ); self::assertSame( $label, self::toolbarValue($view->toolbarMetrics(), 0), @@ -255,7 +247,7 @@ private static function describe(PanelView $view): array ]; } - return ['summary' => $summary, 'blocks' => $blocks, 'toolbar' => $toolbar, 'active' => $view->isActive()]; + return ['summary' => $summary, 'blocks' => $blocks, 'toolbar' => $toolbar]; } /** diff --git a/tests/Debug/fixtures/chunks.view.json b/tests/Debug/fixtures/chunks.view.json index 68e6c33..ac6506d 100644 --- a/tests/Debug/fixtures/chunks.view.json +++ b/tests/Debug/fixtures/chunks.view.json @@ -210,8 +210,7 @@ "filterable": false } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -224,6 +223,5 @@ "style": "plain" } } - ], - "active": true + ] } diff --git a/tests/Debug/fixtures/development.view.json b/tests/Debug/fixtures/development.view.json index 3258939..3202751 100644 --- a/tests/Debug/fixtures/development.view.json +++ b/tests/Debug/fixtures/development.view.json @@ -135,8 +135,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -149,6 +148,5 @@ "style": "plain" } } - ], - "active": true + ] } diff --git a/tests/Debug/fixtures/empty.view.json b/tests/Debug/fixtures/empty.view.json index bc47fb1..f6993a5 100644 --- a/tests/Debug/fixtures/empty.view.json +++ b/tests/Debug/fixtures/empty.view.json @@ -28,6 +28,5 @@ ] } ], - "toolbar": [], - "active": false + "toolbar": [] } diff --git a/tests/Debug/fixtures/mixed.view.json b/tests/Debug/fixtures/mixed.view.json index 83229c8..bccf849 100644 --- a/tests/Debug/fixtures/mixed.view.json +++ b/tests/Debug/fixtures/mixed.view.json @@ -135,8 +135,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } }, { @@ -256,8 +255,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -270,6 +268,5 @@ "style": "plain" } } - ], - "active": true + ] } diff --git a/tests/Debug/fixtures/production.view.json b/tests/Debug/fixtures/production.view.json index a1592eb..1e6420d 100644 --- a/tests/Debug/fixtures/production.view.json +++ b/tests/Debug/fixtures/production.view.json @@ -135,8 +135,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -149,6 +148,5 @@ "style": "plain" } } - ], - "active": true + ] } diff --git a/tests/Debug/fixtures/unavailable.view.json b/tests/Debug/fixtures/unavailable.view.json index ae4a8dc..1a3b74c 100644 --- a/tests/Debug/fixtures/unavailable.view.json +++ b/tests/Debug/fixtures/unavailable.view.json @@ -146,8 +146,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -160,6 +159,5 @@ "style": "plain" } } - ], - "active": true + ] } diff --git a/tests/Debug/fixtures/unknown.view.json b/tests/Debug/fixtures/unknown.view.json index f51eda0..adad1c7 100644 --- a/tests/Debug/fixtures/unknown.view.json +++ b/tests/Debug/fixtures/unknown.view.json @@ -135,8 +135,7 @@ "tone": null } ], - "toolbar": [], - "active": true + "toolbar": [] } } ], @@ -149,6 +148,5 @@ "style": "plain" } } - ], - "active": true + ] }