PHPackages                             vstelmakh/covelyzer - 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. vstelmakh/covelyzer

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

vstelmakh/covelyzer
===================

Tool to analyze PHPUnit test coverage report in clover format

v0.2.0(5y ago)24.7k↑350%3MITPHPPHP ^7.1 || ^8

Since Aug 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vstelmakh/covelyzer)[ Packagist](https://packagist.org/packages/vstelmakh/covelyzer)[ Docs](https://github.com/vstelmakh/covelyzer)[ RSS](/packages/vstelmakh-covelyzer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (3)

Covelyzer
=========

[](#covelyzer)

[![Build status](https://github.com/vstelmakh/covelyzer/workflows/build/badge.svg?branch=master)](https://github.com/vstelmakh/covelyzer/actions)[![Packagist version](https://camo.githubusercontent.com/081221726d70234e575aa11bcedde3565a647c5955977518b36a84ddf78fb73a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f767374656c6d616b682f636f76656c797a65723f636f6c6f723d6f72616e6765)](https://packagist.org/packages/vstelmakh/covelyzer)[![PHP version](https://camo.githubusercontent.com/bf07e8ffce30a59e61221ad6732cc60bca593b83a6330a1cf43c7fa657a22c38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f767374656c6d616b682f636f76656c797a6572)](https://www.php.net/)[![License](https://camo.githubusercontent.com/d348e702309096bb9f3507e49f2215d2c2f82493ef081a0f7e48b63b8c9be4f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f767374656c6d616b682f636f76656c797a65723f636f6c6f723d79656c6c6f77677265656e)](LICENSE)

**Covelyzer** - PHP console tool to analyze PHPUnit test coverage report in clover (XML) format. Covelyzer integrates coverage metrics directly into the workflow forcing developers to write tests and forbidding delivery of uncovered code.

Highlights:

- Works in console
- Easy to integrate
- Flexible configuration
- Same setup locally and on CI
- Not depend on third-party service

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

[](#installation)

Install the latest version with [Composer](https://getcomposer.org/):

```
composer require --dev vstelmakh/covelyzer
```

Usage
-----

[](#usage)

Before you start, run tests with options to generate coverage report in XML format. See corresponding PHPUnit documentation reference [Code coverage analysis](https://phpunit.readthedocs.io/en/9.2/code-coverage-analysis.html)and Covelyzer [phpunit.xml](./phpunit.xml), [composer.json](./composer.json) scripts section as an example.

Run tests with XML coverage xdebug example:

```
vendor/bin/phpunit --dump-xdebug-filter var/xdebug-filter.php && \
vendor/bin/phpunit --prepend var/xdebug-filter.php --coverage-clover var/coverage.xml --whitelist src
```

Run Covelyzer with [default configuration](./resources/default-config.xml):

```
vendor/bin/covelyzer var/coverage.xml
```

To specify additional configuration see [Configuration](#configuration).

Configuration
-------------

[](#configuration)

Configuration defined in `covelyzer.xml` located under project root (where vendor dir located). Or configuration path could be overridden via `-c | --config` command option:

```
vendor/bin/covelyzer var/coverage.xml -c path/to/covelyzer.xml
```

If no configuration file provided - [default configuration](./resources/default-config.xml) is used.

Example configuration:

```

```

#### `` element

[](#covelyzer-element)

Config root element.

##### `timezone` attribute

[](#timezone-attribute)

Timezone should be used to display timestamp.

- use: `optional`
- type: `string` (see: [php timezones](https://www.php.net/manual/en/timezones.php))
- command option: could be defined/overridden via `--timezone` command option

#### `` element

[](#project-element)

Defines configuration for project coverage report. If defined project coverage report will be rendered.

- parent: ``
- use: `optional`

##### `minCoverage` attribute

[](#mincoverage-attribute)

Minimum coverage value. If project have less coverage - report will fail.

- use: `required`
- type: `float` (min: 0, max: 100)

#### `` element

[](#class-element)

Defines configuration for class coverage report. If defined class coverage report will be rendered.

- parent: ``
- use: `optional`

##### `minCoverage` attribute

[](#mincoverage-attribute-1)

Minimum coverage value. If any class have less coverage - report will fail.

- use: `required`
- type: `float` (min: 0, max: 100)

Tips &amp; tricks
-----------------

[](#tips--tricks)

### Use help option

[](#use-help-option)

Use `-h | --help` command option to display Covelyzer help data. It contains all available arguments, options and usage examples.

```
vendor/bin/covelyzer --help
```

### Ignore code blocks

[](#ignore-code-blocks)

Covelyzer will analyze full report produced by PHPUnit. In some cases you want to ignore some code parts to not be taken into account. There are several options available, see [Ignoring code blocks](https://phpunit.readthedocs.io/en/9.2/code-coverage-analysis.html#ignoring-code-blocks)in PHPUnit documentation.

### Speed up coverage with Xdebug

[](#speed-up-coverage-with-xdebug)

The performance of code coverage data collection with Xdebug can be improved by delegating whitelist filtering to Xdebug. See corresponding PHPUnit docs section: [Speeding up code coverage with Xdebug](https://phpunit.readthedocs.io/en/9.2/code-coverage-analysis.html#speeding-up-code-coverage-with-xdebug).

Credits
-------

[](#credits)

[Volodymyr Stelmakh](https://github.com/vstelmakh)
Licensed under the MIT License. See [LICENSE](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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 ~66 days

Total

2

Last Release

2041d ago

PHP version history (2 changes)v0.1.0PHP ^7.1

v0.2.0PHP ^7.1 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b15363f06772c33ab15ad6571f5648cae24638a71df94f97e34f51e2e065b62?d=identicon)[vstelmakh](/maintainers/vstelmakh)

---

Top Contributors

[![vstelmakh](https://avatars.githubusercontent.com/u/2980619?v=4)](https://github.com/vstelmakh "vstelmakh (84 commits)")

---

Tags

analyzerclicoveragephpphpunitphpunitcliconsoletestcoveragereportanalyzer

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vstelmakh-covelyzer/health.svg)

```
[![Health](https://phpackages.com/badges/vstelmakh-covelyzer/health.svg)](https://phpackages.com/packages/vstelmakh-covelyzer)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[php-coveralls/php-coveralls

PHP client library for Coveralls API

51413.7M3.4k](/packages/php-coveralls-php-coveralls)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[friends-of-phpspec/phpspec-code-coverage

Generate Code Coverage reports for PhpSpec tests

202.6M125](/packages/friends-of-phpspec-phpspec-code-coverage)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)

PHPackages © 2026

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