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

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

gosuperscript/phpunit-coverage
==============================

PHPUnit extension that fails the test run when total code coverage drops below a configurable minimum.

v1.0.1(1mo ago)01.6k↑70.7%MITPHP ^8.2

Since May 27Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

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

[](#phpunit-coverage)

A PHPUnit extension that fails the test run when total line coverage drops below a configured minimum. Compatible with PHPUnit 11, 12 and 13.

Install
-------

[](#install)

```
composer require --dev gosuperscript/phpunit-coverage
```

Configure
---------

[](#configure)

Add the extension to your `phpunit.xml` (or `phpunit.xml.dist`):

```

            src

```

ParameterDefaultDescription`minimum``100`Minimum total line coverage percentage required to pass.Behaviour
---------

[](#behaviour)

The extension only checks coverage when PHPUnit has actually collected it — that is, when you run PHPUnit with a coverage report flag (e.g. `--coverage-text`, `--coverage-clover`, `--coverage-html`) and a coverage driver (Xdebug or PCOV) is installed.

- **Coverage enabled, below minimum:** the run fails with exit code `1` and a message printed to STDERR.
- **Coverage enabled, at or above minimum:** the run continues normally.
- **Coverage disabled, running locally:** a PHPUnit warning is emitted, the run continues. Lets you run `vendor/bin/phpunit` without coverage during development.
- **Coverage disabled, running on CI:** the run fails with exit code `1`. CI is detected via the `CI` environment variable (set by GitHub Actions, GitLab CI, CircleCI, Travis, Buildkite, and others).

Run
---

[](#run)

```
vendor/bin/phpunit --coverage-text
```

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

58d ago

### Community

Maintainers

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

---

Top Contributors

[![erikgaal](https://avatars.githubusercontent.com/u/1234268?v=4)](https://github.com/erikgaal "erikgaal (3 commits)")

### Embed Badge

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

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

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M1.0k](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M350](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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