diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md
index a26c480..30afd7b 100644
--- a/DOCUMENTATION/content/documentation/index.md
+++ b/DOCUMENTATION/content/documentation/index.md
@@ -314,6 +314,29 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
+
+
+## Install pcov
+
+1 - First install `pcov` in the Workspace and the PHP-FPM Containers:
+
+a) open the `.env` file
+
+b) search for the `WORKSPACE_INSTALL_PCOV` argument under the Workspace Container
+
+c) set it to `true`
+
+d) search for the `PHP_FPM_INSTALL_PCOV` argument under the PHP-FPM Container
+
+e) set it to `true`
+
+2 - Re-build the containers `docker-compose build workspace php-fpm`
+
+Note that pcov is only supported on PHP 7.1 or newer. For more information on setting up pcov optimally, check the recommended section
+of the [README](https://github.com/krakjoe/pcov)
+
+
+
## Install phpdbg
diff --git a/docker-compose.yml b/docker-compose.yml
index a7478e5..5209d1a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -65,6 +65,7 @@ services:
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
+ - INSTALL_PCOV=${WORKSPACE_INSTALL_PCOV}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
@@ -166,6 +167,7 @@ services:
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
+ - INSTALL_PCOV=${PHP_FPM_INSTALL_PCOV}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SSH2=${PHP_FPM_INSTALL_SSH2}
diff --git a/env-example b/env-example
index 7d63259..0fa3230 100644
--- a/env-example
+++ b/env-example
@@ -101,6 +101,7 @@ WORKSPACE_INSTALL_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false
+WORKSPACE_INSTALL_PCOV=false
WORKSPACE_INSTALL_PHPDBG=false
WORKSPACE_INSTALL_SSH2=false
WORKSPACE_INSTALL_LDAP=false
@@ -168,6 +169,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_XDEBUG=false
+PHP_FPM_INSTALL_PCOV=false
PHP_FPM_INSTALL_XHPROF=false
PHP_FPM_INSTALL_PHPDBG=false
PHP_FPM_INSTALL_IMAP=false
diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile
index 57d13e9..559351d 100644
--- a/php-fpm/Dockerfile
+++ b/php-fpm/Dockerfile
@@ -173,6 +173,24 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
+###########################################################################
+# pcov:
+###########################################################################
+
+USER root
+
+ARG INSTALL_PCOV=false
+
+RUN if [ ${INSTALL_PCOV} = true ]; then \
+ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
+ if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \
+ pecl install pcov && \
+ docker-php-ext-enable pcov \
+ ;fi \
+ ;fi \
+;fi
+
+
###########################################################################
# Phpdbg:
###########################################################################
diff --git a/workspace/Dockerfile b/workspace/Dockerfile
index 57dd1f4..a061941 100644
--- a/workspace/Dockerfile
+++ b/workspace/Dockerfile
@@ -342,6 +342,25 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${L
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
+###########################################################################
+# pcov:
+###########################################################################
+
+USER root
+
+ARG INSTALL_PCOV=false
+
+RUN if [ ${INSTALL_PCOV} = true ]; then \
+ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
+ if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \
+ pecl install pcov && \
+ echo "extension=pcov.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini && \
+ echo "pcov.enabled" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
+ ;fi \
+ ;fi \
+;fi
+
+
###########################################################################
# Phpdbg:
###########################################################################