PHPackages                             ignacio-alveal/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. ignacio-alveal/phpunit-merger

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

ignacio-alveal/phpunit-merger
=============================

Merge multiple PHPUnit reports into one file

21.2kPHP

Since Nov 24Pushed 5mo agoCompare

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

READMEChangelogDependenciesVersions (2)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

23

—

LowBetter than 27% of packages

Maintenance48

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90% 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/048f02f280454f657f806a6571a680405c55676956ea7775f46bb136f55865ac?d=identicon)[overexpOG](/maintainers/overexpOG)

---

Top Contributors

[![IchHabRecht](https://avatars.githubusercontent.com/u/1453345?v=4)](https://github.com/IchHabRecht "IchHabRecht (81 commits)")[![ignacio-alveal](https://avatars.githubusercontent.com/u/194497875?v=4)](https://github.com/ignacio-alveal "ignacio-alveal (7 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/ignacio-alveal-phpunit-merger/health.svg)

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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