PHPackages                             jaschilz/php-coverage-badger - 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. jaschilz/php-coverage-badger

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

jaschilz/php-coverage-badger
============================

Create a code coverage badge from a PHPUnit Clover XML file.

2.0.0(8y ago)12482.0k↓11.7%5[2 PRs](https://github.com/JASchilz/PHPCoverageBadge/pulls)20MITPHP

Since Sep 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JASchilz/PHPCoverageBadge)[ Packagist](https://packagist.org/packages/jaschilz/php-coverage-badger)[ Docs](https://github.com/jaschilz/PhpCoverageBadge)[ RSS](/packages/jaschilz-php-coverage-badger/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (4)Used By (20)

PHPCoverageBadge
================

[](#phpcoveragebadge)

PHPCoverageBadge is a library for creating an SVG coverage badge from a PHPUnit Clover XML file.

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

[](#installation)

Composer!

`composer require --dev jaschilz/php-coverage-badger`

Usage
-----

[](#usage)

1. Generate [XML Code Coverage](https://phpunit.de/manual/current/en/logging.html#logging.codecoverage.xml) using [PHPUnit](https://phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.logging)
2. Run `vendor/bin/php-coverage-badger /path/to/clover.xml /path/to/badge/destination.svg`
    - e.g. `vendor/bin/php-coverage-badger build/clover.xml report/coverage.svg`

Acknowledgements
----------------

[](#acknowledgements)

This library is forked from [Michael Moussa's](https://github.com/ocramius) [php-coverage-checker](https://github.com/michaelmoussa/php-coverage-checker), derived from [Marco Pivetta's](https://github.com/ocramius) post on [CI test coverage checks](https://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/)

Inspiration for generating an SVG badge from coverage results is taken from the [coverage-badge](https://pypi.python.org/pypi/coverage-badge) Python library, derived from the [Shields.io](https://github.com/badges/shields/) project.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 61.5% 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 ~330 days

Total

3

Last Release

3269d ago

Major Versions

1.1.0 → 2.0.02017-07-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6137968?v=4)[JASchilz](/maintainers/JASchilz)[@JASchilz](https://github.com/JASchilz)

---

Top Contributors

[![michaelmoussa](https://avatars.githubusercontent.com/u/183833?v=4)](https://github.com/michaelmoussa "michaelmoussa (8 commits)")[![JASchilz](https://avatars.githubusercontent.com/u/6137968?v=4)](https://github.com/JASchilz "JASchilz (5 commits)")

### Embed Badge

![Health badge](/badges/jaschilz-php-coverage-badger/health.svg)

```
[![Health](https://phpackages.com/badges/jaschilz-php-coverage-badger/health.svg)](https://phpackages.com/packages/jaschilz-php-coverage-badger)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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