From daf3520e27235e4603924fe007dff407e36fcf83 Mon Sep 17 00:00:00 2001 From: Hafiz Muhammad Moaz Date: Wed, 22 Jul 2026 16:18:55 +0500 Subject: [PATCH] fix: green up CI (xdebug extension, icon fixture) The `test` job on main was failing with 7 errors and 1 warning. - CI installed pcov, but `ExceptionHandlerTest` calls `xdebug_get_headers()`, which only exists when Xdebug is loaded. Switched `coverage` to `xdebug` and set `xdebug.mode="develop,coverage"` so both the header inspection and coverage work. - `DebuggerTest::testIconPathOption` pointed at `../guide/image.png`, which does not exist in this repository, so `renderDebugbar()` threw `LogicException: Icon not found`. Repointed at `src/Views/exceptions/favicons/development.png`, a real PNG that is not the default debugbar icon, so the option is still meaningfully exercised. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 4 ++-- tests/DebuggerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f438263..90b0682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,8 @@ jobs: with: php-version: '8.4' extensions: intl, sodium, gd, mysqli, curl, fileinfo, json, dom, simplexml, mbstring, zip, redis, memcached, apcu - coverage: pcov - ini-values: apc.enable_cli=1, mysqli.allow_local_infile=1 + coverage: xdebug + ini-values: apc.enable_cli=1, mysqli.allow_local_infile=1, xdebug.mode="develop,coverage" - name: Validate composer.json run: composer validate --no-check-publish - name: Install dependencies diff --git a/tests/DebuggerTest.php b/tests/DebuggerTest.php index 2044b1b..2a5c9e4 100644 --- a/tests/DebuggerTest.php +++ b/tests/DebuggerTest.php @@ -240,7 +240,7 @@ public function testColorOption() : void public function testIconPathOption() : void { - $iconPath = __DIR__ . '/../guide/image.png'; + $iconPath = __DIR__ . '/../src/Views/exceptions/favicons/development.png'; $this->debugger->setOption('icon_path', $iconPath); self::assertStringContainsString( \base64_encode((string) \file_get_contents($iconPath)),