PHPackages                             santysisi/phpunit-merger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. santysisi/phpunit-merger

ActiveLibrary

santysisi/phpunit-merger
========================

Merge multiple PHPUnit reports into one file

090PHP

Since Oct 29Pushed 6mo agoCompare

[ Source](https://github.com/santysisi/phpunit-merger)[ Packagist](https://packagist.org/packages/santysisi/phpunit-merger)[ RSS](/packages/santysisi-phpunit-merger/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Merge multiple PHPUnit reports into one file
============================================

[](#merge-multiple-phpunit-reports-into-one-file)

[![Latest Stable Version](https://camo.githubusercontent.com/780d7deeb339c2c0e3112635c9224dea9b064842484fd206e87eee3062340955/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696d75742f706870756e69742d6d65726765722e737667)](https://packagist.org/packages/nimut/phpunit-merger)[![StyleCI](https://camo.githubusercontent.com/dab7fea0cf7bd7bf176189dd54821b6d21a65531c4142eb15c58a53b9731b7bf/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131343534303933312f736869656c643f6272616e63683d6d61696e)](https://styleci.io/repos/114540931)[![GitHub Actions](https://github.com/Nimut/phpunit-merger/actions/workflows/test.yml/badge.svg?event=push)](https://github.com/Nimut/phpunit-merger/actions/workflows/test.yml/badge.svg?event=push)

Sometimes it is necessary to run multiple PHPUnit instances to execute all tests of a project. Unfortunately each run writes its own coverage and log reports. There is no support in PHPUnit to merge the reports of multiple runs.

This project provides two commands to merge coverage files as well as log files. It was designed to provide merged reports to e.g. SonarQube Scanner for further processing.

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the testing framework.

```
$ composer require --dev nimut/phpunit-merger
```

Composer will add the package as a dev requirement to your composer.json and install the package with its dependencies.

Usage
-----

[](#usage)

### Coverage

[](#coverage)

The coverage command merges files containing PHP\_CodeCoverage objects into one file in Clover XML format.

```
$ vendor/bin/phpunit-merger coverage  [--html=] []
```

**Arguments**

- `directory`: Directory containing one or multiple files with PHP\_CodeCoverage objects
- `file`: File where the merged result should be stored. Default: Standard output

**Options**

- `html`: Directory where the HTML report should be stored
- `lowUpperBound`: (optional) The lowUpperBound value to be used for HTML format
- `highLowerBound`: (optional) The highLowerBound value to be used for HTML format

### Log

[](#log)

The log command merges files in JUnit XML format into one file in JUnit XML format.

```
$ vendor/bin/phpunit-merger log
```

**Arguments**

- `directory`: Provides the directory containing one or multiple files in JUnit XML format
- `file`: File where the merged result should be stored

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance49

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/717d701eabd4810b2e53e205134a321f33591aa62da31e5221d6e55a77a9a961?d=identicon)[santysisi](/maintainers/santysisi)

---

Top Contributors

[![IchHabRecht](https://avatars.githubusercontent.com/u/1453345?v=4)](https://github.com/IchHabRecht "IchHabRecht (81 commits)")[![santysisi](https://avatars.githubusercontent.com/u/107224084?v=4)](https://github.com/santysisi "santysisi (4 commits)")[![denizsokullu](https://avatars.githubusercontent.com/u/15388560?v=4)](https://github.com/denizsokullu "denizsokullu (1 commits)")[![tomasnorre](https://avatars.githubusercontent.com/u/1212481?v=4)](https://github.com/tomasnorre "tomasnorre (1 commits)")

### Embed Badge

![Health badge](/badges/santysisi-phpunit-merger/health.svg)

```
[![Health](https://phpackages.com/badges/santysisi-phpunit-merger/health.svg)](https://phpackages.com/packages/santysisi-phpunit-merger)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
