PHPackages                             peridot-php/peridot-code-coverage-reporters - 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. peridot-php/peridot-code-coverage-reporters

ActiveLibrary

peridot-php/peridot-code-coverage-reporters
===========================================

Code coverage reporters for Peridot PHP.

3.0.0(8y ago)270.3k↓41.1%5[2 issues](https://github.com/peridot-php/peridot-code-coverage-reporters/issues)17MITPHP

Since Oct 29Pushed 8y ago2 watchersCompare

[ Source](https://github.com/peridot-php/peridot-code-coverage-reporters)[ Packagist](https://packagist.org/packages/peridot-php/peridot-code-coverage-reporters)[ RSS](/packages/peridot-php-peridot-code-coverage-reporters/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (9)Used By (17)

Peridot Code Coverage Reporters
===============================

[](#peridot-code-coverage-reporters)

[![Packagist Version](https://camo.githubusercontent.com/7aac27fd3994124a01db3fadaa1620806cd42b360526f8846b8fb688b62b3071/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70657269646f742d7068702f70657269646f742d636f64652d636f7665726167652d7265706f72746572732e7376673f7374796c653d666c61742d737175617265 "Packagist Version")](https://packagist.org/packages/peridot-php/peridot-code-coverage-reporters)[![Build Status](https://camo.githubusercontent.com/2fdf36835ce1e485f5d80b60781c8b7a30b1619960c9bd1fa14d866e56661e37/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f70657269646f742d7068702f70657269646f742d636f64652d636f7665726167652d7265706f72746572732f6d61737465722e7376673f7374796c653d666c61742d737175617265 "Build Status")](https://travis-ci.org/peridot-php/peridot-code-coverage-reporters)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a03373ab85de3f4fc2004664128e9f21889899fa5c54bfa90c454c76c2216599/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70657269646f742d7068702f70657269646f742d636f64652d636f7665726167652d7265706f72746572732e7376673f7374796c653d666c61742d737175617265 "Scrutinizer Code Quality")](https://scrutinizer-ci.com/g/peridot-php/peridot-code-coverage-reporters/?branch=master)[![Codecov Coverage](https://camo.githubusercontent.com/06a82900ab6293df4152c8360e1d00edd44c759bf5f286726e727b05b575d4ef/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70657269646f742d7068702f70657269646f742d636f64652d636f7665726167652d7265706f72746572732f6d61737465722e7376673f7374796c653d666c61742d737175617265 "Codecov Coverage")](https://codecov.io/gh/peridot-php/peridot-code-coverage-reporters)[![Gitter Chat](https://camo.githubusercontent.com/e4e66feb2980ed424f53dcbc0fbbedb6e78545ccf81477ba59e905a4417fd156/68747470733a2f2f696d672e736869656c64732e696f2f6769747465722f726f6f6d2f70657269646f742d7068702f6c6f6262792e7376673f7374796c653d666c61742d737175617265 "Gitter Chat")](https://gitter.im/peridot-php/lobby)

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

[](#installation)

Add this package as a dependency:

```
composer require --dev peridot-php/peridot-code-coverage-reporters

```

Then register the reporters in your `peridot.php` configuration:

```
use Evenement\EventEmitterInterface;
use Peridot\Reporter\CodeCoverage\CodeCoverageReporter;
use Peridot\Reporter\CodeCoverageReporters;

return function (EventEmitterInterface $emitter) {
    $coverage = new CodeCoverageReporters($emitter);
    $coverage->register();

    $emitter->on('code-coverage.start', function (CodeCoverageReporter $reporter) {
        $reporter->addDirectoryToWhitelist(__DIR__ . '/src');
    });
};
```

Usage
-----

[](#usage)

This package provides several *Peridot* reporters that can be used via the `--reporter` option:

- `html-code-coverage`
- `text-code-coverage`
- `clover-code-coverage`
- `xml-code-coverage`
- `crap4j-code-coverage`
- `php-code-coverage`

These reporters are all driven by [php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage), which requires the use of either the `phpdbg` executable, or the `xdebug` PHP extension in order to produce coverage reports.

### With `phpdbg`

[](#with-phpdbg)

Where available, `phpdbg` is generally recommended for faster coverage reporting. Most system-level package management tools should be able to install a version of `phpdbg` with minimal hassle. Under [Homebrew](https://brew.sh/), for example, `phpdbg` can be installed like so:

```
brew tap homebrew/homebrew-php && brew install php71 --with-phpdbg

```

Once installed, `phpdbg -qrr` can be used in place of `php` when executing scripts, including the `peridot` binary, allowing code coverage to be generated:

```
phpdbr -qrr vendor/bin/peridot --reporter spec --reporter html-code-coverage

```

The above command will print spec-style output while the suite runs, and generate an HTML coverage report once the suite has completed.

### With `xdebug`

[](#with-xdebug)

Use of `xdebug` is no longer recommended, because of the significantly worse performance compared to `phpdbg`. If `phpdbg` is not an option, simply make sure the `xdebug` extension is enabled when running `peridot`:

```
vendor/bin/peridot --reporter spec --reporter html-code-coverage

```

The above command will print spec-style output while the suite runs, and generate an HTML coverage report once the suite has completed.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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

Every ~175 days

Recently: every ~263 days

Total

7

Last Release

3164d ago

Major Versions

1.0.2 → 2.0.02016-03-10

2.0.2 → 3.0.02017-09-18

### Community

Maintainers

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

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

---

Top Contributors

[![austinsmorris](https://avatars.githubusercontent.com/u/1616868?v=4)](https://github.com/austinsmorris "austinsmorris (18 commits)")[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (10 commits)")[![brianium](https://avatars.githubusercontent.com/u/636651?v=4)](https://github.com/brianium "brianium (6 commits)")[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (2 commits)")[![m6w6](https://avatars.githubusercontent.com/u/1265282?v=4)](https://github.com/m6w6 "m6w6 (1 commits)")

### Embed Badge

![Health badge](/badges/peridot-php-peridot-code-coverage-reporters/health.svg)

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

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[codeception/codeception

All-in-one PHP Testing Framework

4.9k86.2M2.9k](/packages/codeception-codeception)[phpunit/phpcov

CLI frontend for php-code-coverage

23721.1M583](/packages/phpunit-phpcov)[facile-it/paraunit

paraunit

146721.6k11](/packages/facile-it-paraunit)[matthiasnoback/live-code-coverage

Generate code coverage reports on a live server

1191.1M2](/packages/matthiasnoback-live-code-coverage)

PHPackages © 2026

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