From 6d8edeb89c410b3f8abc5bd437a1a9ccb8ce9419 Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 30 Jan 2026 00:28:47 +0000 Subject: [PATCH] fix(php): set XDEBUG_MODE=coverage for PHPUnit 11 compatibility PHPUnit 11 returns exit code 1 when xdebug coverage mode isn't set, even if all tests pass. This caused false failures in the QA pipeline. Setting XDEBUG_MODE=coverage in the test environment resolves the warning and ensures tests return exit code 0 on success. Co-Authored-By: Claude Opus 4.5 --- pkg/php/testing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/php/testing.go b/pkg/php/testing.go index a6257eba..6ea69584 100644 --- a/pkg/php/testing.go +++ b/pkg/php/testing.go @@ -87,6 +87,9 @@ func RunTests(ctx context.Context, opts TestOptions) error { cmd.Stderr = opts.Output cmd.Stdin = os.Stdin + // Set XDEBUG_MODE=coverage to avoid PHPUnit 11 warning + cmd.Env = append(os.Environ(), "XDEBUG_MODE=coverage") + return cmd.Run() }