I am trying to generate PHPUnit's code coverage report but get this error: No code coverage driver is available
I am on Mac and when I run php -v
at the terminal I get this:
PHP 7.3.11 (cli) (built: Jul 5 2020 03:23:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
This SO answer told me to install XDebug with Homebrew, but that fails as Homebrew can't find a matching formula (for my version of php).
This answer on SO told me to install/activate XDebug or zend-debugger. To install XDebug, their website tells me to run pecl install xdebug
, which has the error ERROR: failed to mkdir /usr/lib/php/pear/docs/xdebug/contrib
(same error if I do sudo pecl install xdebug
). If I try and create the folder manually, I get the error mkdir: pear: Operation not permitted
.
Any help is appreciated.