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)12408.0k—8%5[2 PRs](https://github.com/JASchilz/PHPCoverageBadge/pulls)20MITPHP

Since Sep 30Pushed 2y 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 1mo 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 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

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

3223d ago

Major Versions

1.1.0 → 2.0.02017-07-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b43989ce7a387c05c59282788d15171a28abf61e02614a7a005cb19ef8da2b4?d=identicon)[JASchilz](/maintainers/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

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[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)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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