Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 989 Bytes

pcov.md

File metadata and controls

37 lines (24 loc) · 989 Bytes

PCOV

PCOV is a lightweight PHP extension for code coverage analysis.

We only support PHP 8.1+ for PCOV. The extension is disabled by default.

How it works

It works by hooking into the PHP executor to record which lines of code are executed during runtime. PCOV is designed to be significantly faster than Xdebug for collecting line coverage information, with minimal impact on code execution speed.

Check the documentation for your testing framework to see how you can use PCOV. For example, with Laravel and Pest, you can run php artisan test --coverage.

Enabling PCOV

Exec into the desired PHP container, run "debug --enable pcov", then restart the container:

# Choose the PHP version you want
devin 83
debug --enable pcov
exit
docker-compose restart

Disabling PCOV

Same as above, but run "debug --disable-all":

# Choose the PHP version you want
devin 83
debug --disable-all
exit
docker-compose restart