Skip to content
Snippets Groups Projects
Commit 3e7369f8 authored by jurgenhaas's avatar jurgenhaas
Browse files

#50 Add PHP coverage to debug modes

parent 9c3492a1
No related branches found
Tags v3.5.6
No related merge requests found
......@@ -3,7 +3,9 @@ commands:
on:
cmd: |
PHP_DEBUG=1
PHP_COVERAGE=0
echo "PHP_DEBUG=1" >>.env
echo "PHP_COVERAGE=0" >>.env
env -i $(cat .env | xargs) >.env
composer lakedrops:docker4drupal --no-interaction
ahoy d4d up php
......@@ -11,8 +13,20 @@ commands:
off:
cmd: |
PHP_DEBUG=0
PHP_COVERAGE=0
echo "PHP_DEBUG=0" >>.env
echo "PHP_COVERAGE=0" >>.env
env -i $(cat .env | xargs) >.env
composer lakedrops:docker4drupal --no-interaction
ahoy d4d up php
usage: Turn off PHP debugging
coverage:
cmd: |
PHP_DEBUG=1
PHP_COVERAGE=1
echo "PHP_DEBUG=1" >>.env
echo "PHP_COVERAGE=1" >>.env
env -i $(cat .env | xargs) >.env
composer lakedrops:docker4drupal --no-interaction
ahoy d4d up php
usage: Turn on PHP debugging
......@@ -81,6 +81,7 @@ class Handler extends BaseHandler {
'php' => [
'version' => $this->env->receiveGlobal('PHP_VERSION', 'PHP version', '7.4'),
'xdebug' => $this->env->receiveGlobal('PHP_DEBUG', 'PHP debug', '0'),
'coverage' => $this->env->receiveGlobal('PHP_COVERAGE', 'PHP coverage', '0'),
],
'dbserver' => [
'type' => 'mariadb',
......
......@@ -38,7 +38,7 @@ services:
{% if php.xdebug %}
PHP_XDEBUG: 1
PHP_XDEBUG_MAX_NESTING_LEVEL: 512
PHP_XDEBUG_MODE: debug
PHP_XDEBUG_MODE: {% if php.coverage %}coverage{% else %}debug{% endif %}
PHP_XDEBUG_REMOTE_HOST: {{ docker0.ip }}
PHP_XDEBUG_CLIENT_HOST: {{ docker0.ip }}
PHP_XDEBUG_LOG: /dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment