PHPackages                             robiningelbrecht/phpunit-coverage-check - 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. robiningelbrecht/phpunit-coverage-check

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

robiningelbrecht/phpunit-coverage-check
=======================================

Check the code coverage using the clover or text report of phpunit

0.3.1(6y ago)07.7k1MITPHPPHP &gt;=7.0.0

Since May 9Pushed 4y agoCompare

[ Source](https://github.com/robiningelbrecht/phpunit-coverage-check)[ Packagist](https://packagist.org/packages/robiningelbrecht/phpunit-coverage-check)[ RSS](/packages/robiningelbrecht-phpunit-coverage-check/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (10)Used By (1)

phpunit-coverage-check
======================

[](#phpunit-coverage-check)

[![CI](https://github.com/robiningelbrecht/phpunit-coverage-check/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/robiningelbrecht/phpunit-coverage-check/actions/workflows/main.yml)[![codecov](https://camo.githubusercontent.com/b5ad5b34fa6cadc8184785ca4b8684323d20148d0f5929479fcef3f1db8bf118/68747470733a2f2f636f6465636f762e696f2f67682f726f62696e696e67656c6272656368742f706870756e69742d636f7665726167652d636865636b2f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d5738515230304d535037)](https://codecov.io/gh/robiningelbrecht/phpunit-coverage-check)

This php script will read the clover xml report from phpunit and calculates the coverage score. Based on the given threshold the script will exit ok of the coverage is higher then the threshold or exit with code 1 if the coverage is lower then the threshold. This script can be used in your continuous deployment environment or for example added to a pre-commit hook.

Installation
============

[](#installation)

The script can be installed using composer. Add this repository as a dependency to the composer.json file.

```
composer require --dev robiningelbrecht/phpunit-coverage-check dev-master
```

Usage
=====

[](#usage)

Generate the coverage file by using phpunit and run the coverage check script:

```
vendor/bin/phpunit --coverage-clover clover.xml
vendor/bin/coverage-checker clover.xml 80
```

Available arguments and options
===============================

[](#available-arguments-and-options)

```
Command coverage-checker, version 1.0

Check the code coverage using the clover or text report of phpunit

Usage: coverage-checker [OPTIONS...] [ARGUMENTS...]

Arguments:
                             The location of the file that's generated by phpunit
                       The coverage threshold that is acceptable. Min = 1, Max = 100

Options:
  [-f|--formatter]                 Formatter to use ("message" by default)
  [-p|--processor]                 Processor to use ("clover-coverage" by default)
  [-m|--enabled-metrics]           Metrics to use when calculating coverage. Defaults to all
  [-elc|--exit-on-low-coverage]    Exit the script when low coverage is detected. Defaults to "false"
  [-h|--help]                      Show help
  [-v|--verbosity]                 Verbosity level
  [-V|--version]                   Show version

Legend:  [optional] variadic...
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.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 ~156 days

Recently: every ~110 days

Total

9

Last Release

2408d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.5.0

0.2.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c460d3d078ca95a2f552ae1eb15d4fb916781d264149a1d5ca503fe69967b91?d=identicon)[robiningelbrecht](/maintainers/robiningelbrecht)

---

Top Contributors

[![robiningelbrecht](https://avatars.githubusercontent.com/u/203894?v=4)](https://github.com/robiningelbrecht "robiningelbrecht (33 commits)")[![richardregeer](https://avatars.githubusercontent.com/u/16963508?v=4)](https://github.com/richardregeer "richardregeer (14 commits)")[![rregeer](https://avatars.githubusercontent.com/u/4814166?v=4)](https://github.com/rregeer "rregeer (8 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (3 commits)")[![ttomdewit](https://avatars.githubusercontent.com/u/2845400?v=4)](https://github.com/ttomdewit "ttomdewit (3 commits)")[![sanmai](https://avatars.githubusercontent.com/u/139488?v=4)](https://github.com/sanmai "sanmai (2 commits)")

---

Tags

phptestingphpunitciunittestcode coverage

### Embed Badge

![Health badge](/badges/robiningelbrecht-phpunit-coverage-check/health.svg)

```
[![Health](https://phpackages.com/badges/robiningelbrecht-phpunit-coverage-check/health.svg)](https://phpackages.com/packages/robiningelbrecht-phpunit-coverage-check)
```

###  Alternatives

[rregeer/phpunit-coverage-check

Check the code coverage using the clover report of phpunit

606.1M179](/packages/rregeer-phpunit-coverage-check)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)[friendsofcake/fixturize

CakePHP Fixture classes to help increase productivity or performance

24504.7k1](/packages/friendsofcake-fixturize)[hot/phpunit-runner

The lib allows to watch phpunit tests

3066.9k4](/packages/hot-phpunit-runner)

PHPackages © 2026

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