Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PCOV_ENABLED env var as enable/disable switch #90

Open
Slamdunk opened this issue Jun 15, 2022 · 1 comment
Open

Add PCOV_ENABLED env var as enable/disable switch #90

Slamdunk opened this issue Jun 15, 2022 · 1 comment

Comments

@Slamdunk
Copy link
Contributor

Hi, xDebug:v3 has introduced the XDEBUG_MODE environment variable to turn xDebug on and off.

In context where you spawn child processes like ParaTest env vars are easier to handle and propagate to external procs than custom ini settings passed as options to the php-cli binary (i.e. php -d pcov.enabled=1).

There is no standardized way to propagate ini options, so now we need to explicitly tell them like:

php -d pcov.enabled=1 vendor/bin/paratest --passthru-php="'-d' 'pcov.enabled=1'"

Env vars on the contrary are simple to propagate, so in the context of xDebug it's easier:

XDEBUG_MODE=coverage vendor/bin/paratest

Would it be possible to introduce a PCOV_ENABLED env var to enable/disable pcov?

@cmb69
Copy link
Contributor

cmb69 commented Aug 7, 2024

Sounds reasonable, but note that you can also use environment variables in a php.ini.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants