|
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.160svs. $ time XDEBUG_MODE=coverage ./vendor/bin/composer-require-checker -q
real 0m49.456s
user 0m49.262s
sys 0m0.190sIs 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? |
Answered by
veewee
Aug 1, 2023
Replies: 2 comments 1 reply
|
There is currently no way to specify environment variables per task seperately. |
1 reply
Answer selected by
AegirLeet
|
We set |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is currently no way to specify environment variables per task seperately.
Maybe you get better results with pcov instead of xdebug?