This PR allows using an environment variable PHPUNIT_SPEEDTRAP to disable slowness profiling for each environment. Setting the value "disabled" will disable slowness profiling and not display the slowness report in the PHPUnit test suite output. The README contains more information.
phpunit.xml can also be configured to disable profiling by default with PHPUNIT_SPEEDTRAP="disabled". A developer can enable slowness profiling locally or one time only by setting PHPUNIT_SPEEDTRAP="enabled" using any environment variable mechanism in PHP.
This PR allows using an environment variable
PHPUNIT_SPEEDTRAP
to disable slowness profiling for each environment. Setting the value "disabled" will disable slowness profiling and not display the slowness report in the PHPUnit test suite output. The README contains more information.Disable for just this run
Disabled by default, enable for just this run
phpunit.xml can also be configured to disable profiling by default with PHPUNIT_SPEEDTRAP="disabled". A developer can enable slowness profiling locally or one time only by setting PHPUNIT_SPEEDTRAP="enabled" using any environment variable mechanism in PHP.
Disable profiling in phpunit.xml by default
Enable profiling for just this run
How do I set environment variables?
PHP supports many ways to set environment variables, making this a flexible feature to match any project configuration.
Some projects use vlucas/phpdotenv to manage their environment variables.
Associated Issues
62 requested a feature to disable slowness profiling when generating code coverage
63 documents the original proposed feature and request for comments