Skip to content

Instantly share code, notes, and snippets.

@gladx
Created July 13, 2021 07:50
Show Gist options
  • Save gladx/099026c02874c7f06c50b3ac7527e539 to your computer and use it in GitHub Desktop.
Save gladx/099026c02874c7f06c50b3ac7527e539 to your computer and use it in GitHub Desktop.
Manual setup xdebug and phpunit coverage code in api-platform with docker
docker exec  -it  project_name_xxx_php_1 sh

apk add --no-cache --virtual .build-deps $PHPIZE_DEPS;
pecl install xdebug-3.0.2;
docker-php-ext-enable xdebug;

pecl install pcov
composer require --dev pcov/clobber
vi /usr/local/etc/php/php.ini
extension=pcov.so

./bin/phpunit --coverage-html reports/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment