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

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

bushlanov-dev/php-coverage-badger
=================================

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

2.1.0(10mo ago)16143MITPHPPHP &gt;=7.0

Since Aug 24Pushed 8mo agoCompare

[ Source](https://github.com/BushlanovDev/php-coverage-badger)[ Packagist](https://packagist.org/packages/bushlanov-dev/php-coverage-badger)[ Docs](https://github.com/BushlanovDev/php-coverage-badge)[ RSS](/packages/bushlanov-dev-php-coverage-badger/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (3)

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

[](#phpcoveragebadge)

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

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

[](#installation)

Composer!

`composer require --dev bushlanov-dev/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 clover.xml badge.svg  `
    - e.g. `vendor/bin/php-coverage-badger build/clover.xml report/square.svg --square` ![coverage](.github/square.svg)
    - e.g. `vendor/bin/php-coverage-badger build/clover.xml report/coverage.svg` ![coverage](.github/coverage.svg)
    - e.g. `vendor/bin/php-coverage-badger build/clover.xml report/phpunit.svg PHPUnit` ![PHPUnit](.github/phpunit.svg)
    - e.g. `vendor/bin/php-coverage-badger build/clover.xml report/your-text.svg "Aprx9chr"` ![your-text](.github/your-text.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.

License
-------

[](#license)

This repository's source code is available under the [MIT License](LICENSE).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance56

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

313d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e7e58d480641faf4a7eb02eef574f12f67365b63800390e9dc32208a436b43c?d=identicon)[BushlanovDev](/maintainers/BushlanovDev)

---

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)")[![BrianHenryIE](https://avatars.githubusercontent.com/u/4720401?v=4)](https://github.com/BrianHenryIE "BrianHenryIE (3 commits)")[![BushlanovDev](https://avatars.githubusercontent.com/u/182418502?v=4)](https://github.com/BushlanovDev "BushlanovDev (2 commits)")

### Embed Badge

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

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

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

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

PHPackages © 2026

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