Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

php-code-coverage

> 编程语言
Open source

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

8.9K stars0 likes0 views
WebsiteGitHub

About

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

phpunit/php-code-coverage

Provides collection, processing, and rendering functionality for PHP code coverage information.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require phpunit/php-code-coverage

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev phpunit/php-code-coverage

Usage

Collecting code coverage data and generating a report

…

Generating a report from serialized code coverage data

php
<?php declare(strict_types=1);
use SebastianBergmann\CodeCoverage\Report\Facade as ReportFacade;
use SebastianBergmann\CodeCoverage\Serialization\Unserializer;

$data = (new Unserializer)->unserialize('/path/to/coverage.php');

ReportFacade::fromSerializedData($data)->renderOpenClover('/tmp/openclover.xml');

Issues· 6 open

View all issuesOpen on GitHub
  • #1163

    Dependency Dashboard

    type/dependenciesUpdated Sep 29, 2026
  • #1257

    Never-executed `match` default arm reported as covered when the `match` is the operand of `return`

    type/bugstatic-analysisUpdated Aug 17, 2026
  • #386

    Refactor how filtering works

    type/refactoringUpdated Jul 9, 2026
  • #1083

    identifying uncovered (executable) lines from the XML export

    Updated Jul 28, 2025
  • #1056

    Add branch coverage statistics to XML report output

    type/enhancementreport/xmlUpdated Feb 25, 2025

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言