-
We need Xdebug enabled for PHPUnit code coverage, but it slows down composer-require-checker immensely (see here): $ time XDEBUG_MODE=off ./vendor/bin/composer-require-checker -q
real 0m8.921s
user 0m8.760s
sys 0m0.160s vs. $ time XDEBUG_MODE=coverage ./vendor/bin/composer-require-checker -q
real 0m49.456s
user 0m49.262s
sys 0m0.190s Is there any way to enable/disable Xdebug on a per-task basis? Patching the task like this does solve the issue, but I'm not sure if that's something that could actually be upstreamed into GrumPHP: diff --git a/src/Task/ComposerRequireChecker.php b/src/Task/ComposerRequireChecker.php
index 46ed1ce6..2429a35b 100644
--- a/src/Task/ComposerRequireChecker.php
+++ b/src/Task/ComposerRequireChecker.php
@@ -66,7 +66,7 @@ class ComposerRequireChecker extends AbstractExternalTask
$process = $this->processBuilder->buildProcess($arguments);
- $process->run();
+ $process->run(env: ['XDEBUG_MODE' => 'off']);
if (!$process->isSuccessful()) {
return TaskResult::createFailed($this, $context, $this->formatter->format($process)); Is there a better way? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There is currently no way to specify environment variables per task seperately. |
Beta Was this translation helpful? Give feedback.
-
We set |
Beta Was this translation helpful? Give feedback.
There is currently no way to specify environment variables per task seperately.
Maybe you get better results with pcov instead of xdebug?