mridang/phpunit-reporters 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mridang/phpunit-reporters

最新稳定版本:1.0.2

Composer 安装命令:

composer require mridang/phpunit-reporters

包简介

A PHPUnit reporter that displays code coverage in the console.

README 文档

README

phpunit-reporters is a PHPUnit extension that displays code coverage results in Jest/Istanbul's console format with a directory tree structure.

Why?

Using phpunit-reporters lets you see coverage in Jest's familiar table format right in your terminal. The reporter organizes files into a directory tree, shows uncovered line ranges (e.g., 5-12,18), and applies the same color coding as Jest so your PHP coverage reports look exactly like your JavaScript ones.

Usage

Add the package to your project:

composer require --dev mridang/phpunit-reporters

Then run your tests with coverage:

vendor/bin/phpunit --coverage-clover build/coverage/clover.xml

The Jest-style coverage table will automatically appear at the end of your test run.

Options

The plugin automatically detects terminal width and formats output accordingly. Coverage data is read from PHPUnit's clover.xml report, so use standard PHPUnit coverage options:

vendor/bin/phpunit --coverage-clover build/coverage/clover.xml

Ensure Xdebug or PCOV is installed and configured for coverage collection.

Contributing

Contributions are welcome! If you find a bug or have suggestions for improvement, please open an issue or submit a pull request.

License

Apache License 2.0 © 2025 Mridang Agarwalla

统计信息

  • 总下载量: 81
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-12-26