pest
pest copied to clipboard
[Bug]: Misleading coverage error with read-only vendor
What Happened
When the vendor directory is not writable by the user executing pest, coverage fails to generate with the confusing message:
WARN Unable to get coverage using Xdebug. Did you set Xdebug's coverage mode?
In my case, Xdebug was correctly configured, just vendor/pestphp/pest/.temp was not writable. So I spent a lot of time looking in the wrong location for the issue.
How to Reproduce
sudo chown -R root.root vendor
vendor/bin/pest --coverage
Sample Repository
No response
Pest Version
2.34.7
PHP Version
8.1.14
Operation System
Linux
Notes
I was executing tests within a docker container.