From 2bf6deda7d0444ff4b79599be6c562eebdf68a6e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 19 Dec 2025 15:49:45 +0100 Subject: [PATCH] Coverage-xml cannot contain pcov and xdebug at the same time attribute name needs to be unique --- src/Report/Xml/BuildInformation.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Report/Xml/BuildInformation.php b/src/Report/Xml/BuildInformation.php index b9375f228..720191978 100644 --- a/src/Report/Xml/BuildInformation.php +++ b/src/Report/Xml/BuildInformation.php @@ -39,14 +39,12 @@ public function __construct( $xmlWriter->startElement('driver'); - if ($runtime->hasXdebug()) { - $xmlWriter->writeAttribute('name', 'xdebug'); - $xmlWriter->writeAttribute('version', phpversion('xdebug')); - } - if ($runtime->hasPCOV()) { $xmlWriter->writeAttribute('name', 'pcov'); $xmlWriter->writeAttribute('version', phpversion('pcov')); + } elseif ($runtime->hasXdebug()) { + $xmlWriter->writeAttribute('name', 'xdebug'); + $xmlWriter->writeAttribute('version', phpversion('xdebug')); } $xmlWriter->endElement();