PHPackages                             mjkruszewski/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. [Testing &amp; Quality](/categories/testing)
4. /
5. mjkruszewski/phpunit-merger

ActiveLibrary[Testing &amp; Quality](/categories/testing)

mjkruszewski/phpunit-merger
===========================

Merge multiple PHPUnit reports into one file

1.0.1(7y ago)06GPL-2.0+PHPPHP &gt;=7.0.0 &lt; 7.4

Since Dec 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/MJKruszewski/phpunit-merger)[ Packagist](https://packagist.org/packages/mjkruszewski/phpunit-merger)[ Docs](https://github.com/Nimut/phpunit-merger)[ RSS](/packages/mjkruszewski-phpunit-merger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (6)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/77ca6eb757f74144507b0795994d3411991dd99c1e32d415a67b8538c2b47e07/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131343534303933312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/114540931)

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
```

**Arguments**

- `directory`: Provides the directory containing one or multiple files with PHP\_CodeCoverage objects
- `output`: Output where the merged result should be stored. This can be a file `foo.xml` or directory name
- `type`: Output type default value is `clover`. This can be `clover` or `html`

### 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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 86.4% 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.

###  Release Activity

Cadence

Every ~148 days

Total

4

Last Release

2619d ago

Major Versions

0.1.1 → 1.0.02019-03-08

PHP version history (3 changes)0.1.0PHP &gt;=7.0.8 &lt; 7.3

0.1.1PHP &gt;=7.0.8 &lt; 7.4

1.0.1PHP &gt;=7.0.0 &lt; 7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e75aa343c5373688836f32b06222ee2bd4a7ab4787b13364fea7bc97dc08949c?d=identicon)[MJKruszewski](/maintainers/MJKruszewski)

---

Top Contributors

[![IchHabRecht](https://avatars.githubusercontent.com/u/1453345?v=4)](https://github.com/IchHabRecht "IchHabRecht (19 commits)")[![MJKruszewski](https://avatars.githubusercontent.com/u/12052557?v=4)](https://github.com/MJKruszewski "MJKruszewski (3 commits)")

---

Tags

phpunitcoverageTYPO3 CMSsonarqube

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k118.8M752](/packages/brianium-paratest)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[nimut/phpunit-merger

Merge multiple PHPUnit reports into one file

501.7M7](/packages/nimut-phpunit-merger)[facile-it/paraunit

paraunit

146721.6k10](/packages/facile-it-paraunit)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[lmc/steward

Steward - makes Selenium WebDriver + PHPUnit testing easy and robust

222163.1k1](/packages/lmc-steward)

PHPackages © 2026

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