Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

PHP_CodeCoverage

github.com

  • Free plan
  • Self-hosted
6.7 Club score Visit github.com

What the maker publishes

Coverage collection
The usage example starts and stops coverage collection for a named test. source
Coverage drivers
The package suggests PCOV for line coverage and Xdebug for line, branch and path coverage. source
Coverage limitation
The PHPUnit manual says PCOV supports line coverage only; branch and path coverage require data collected with Xdebug. source
Coverage metrics
The PHPUnit manual says the library supports line, branch, path, function and method, class and trait coverage, and the CRAP index. source
Development use
For development-only use, the README recommends adding it as a development dependency with `composer require --dev phpunit/php-code-coverage`. source
Development use
The README recommends adding it as a development-time dependency when it is only needed to run a project's test suite. source
HTML reports
HTML reports provide directory and file views with line-by-line highlighting, plus class, trait and function views organized by namespace. source
Installation
The library can be added as a local project dependency with Composer using `composer require phpunit/php-code-coverage`. source
Installation
The README shows installation as a per-project dependency with Composer. source
Integration
The repository describes the library as a first-party dependency of PHPUnit. source
License
The package is licensed under BSD-3-Clause. source
License
The repository identifies the library's license as BSD-3-Clause. source
Maintainer
The Composer manifest names Sebastian Bergmann as the lead author. source
Parallel runs
Serialized coverage files from separate test runs can be merged with phpcov to produce a combined report. source
Patch analysis
The phpcov patch-coverage command calculates coverage for changed lines in a unified diff. source
PHP requirement
The Composer manifest requires PHP version 8.4 or later. source
Purpose
PHP_CodeCoverage is a library for collecting, processing, and rendering PHP code coverage information. source
Purpose
The library collects, processes, and renders PHP code coverage information. source
Report formats
The PHPUnit manual lists HTML, Clover, OpenClover, Cobertura, Crap4J, PHPUnit XML, text, JSONL and serialized PHP output. source
Report output
The example renders an OpenClover report from collected coverage data. source
Runtime extensions
The Composer manifest requires the DOM, libxml, mbstring, and xmlwriter PHP extensions. source
Runtime requirements
The current package requires PHP 8.4 or later and the DOM, libxml, mbstring and xmlwriter extensions. source
Security policy coverage
The project states that PHPUnit's security policy also applies to this library because it is a first-party PHPUnit dependency. source
Security reporting
The library follows PHPUnit's security policy; vulnerability reports should be sent through coordinated disclosure rather than public GitHub issues, discussions or pull requests. source

Checked against the maker's pages on 11 Oct 2026.