[4.x] Text coverage not compatible with `coverage-php`

Open
#1,160 3 comments 0 reactions 1 assignee View on GitHub

@emmadesilva is already working on this.

Since Apr 10, 2026.

Assessment

This issue has not been assessed yet.

Description

bug
What Happened

Seems to be unable to get serialized test coverage whilst also printing the standard text to console.

# Creates test.cov but gives no text output
vendor/bin/pest --coverage-text --coverage-php=test.cov 

# Prints text, but creates no test.cov due to "WARN  Option --coverage-php cannot be used more than once"
vendor/bin/pest --coverage --coverage-text --coverage-php=test.cov 
How to Reproduce

Fresh laravel new with Pest

Sample Repository

No response

Pest Version

2.34.7

PHP Version

8.3.7

Operation System

macOS

Notes
php -v

PHP 8.3.7 (cli) (built: May 10 2024 12:47:16) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
    with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans
    with Zend OPcache v8.3.7, Copyright (c), by Zend Technologies
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pestphp/pest

All issues in pestphp/pest

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.