Closed bilogic closed 10 months ago
what 's the use case?
My custom artisan commands always show the amount of time taken from LARAVEL_START
until exit, so that all developers are exposed to this simple performance metric constantly.
One of the command is a overridden version of migrate:fresh
which is executed during our CI/CD and because it cannot find LARAVEL_START
, the test fails.
I suppose define('LARAVEL_START', microtime(true));
at the start of testbench's first PHP file would have minimal impact, right?
Feel free to submit the PR to https://github.com/orchestral/testbench-core/blob/0b7de82296358c3013fe0a3d1128cbb6dc33f801/src/Console/Commander.php#L97 and target branch 6.x
I added define('LARAVEL_START', microtime(true));
at your location, but it did not solve my problem.
Eventually, I fixed it by adding define('LARAVEL_START', microtime(true));
at these locations
The equivalent in testbench-core would be https://github.com/orchestral/testbench-core/blob/158e2f483bccab28f36d6170a551641534813886/src/TestCase.php#L48
Or is there a better place to define LARAVEL_START
?
Hi!
My commands rely on
LARAVEL_START
so that I can constantly keep an eye out for performance issues. Can also define it so that my code don't have to work around it? I can PR.Thank you!