From 9ee17e3a8d6c2c94862598eabaccd156e8e413dd Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Sun, 19 Jun 2022 04:11:02 +0200 Subject: [PATCH] Don't care about this statistic on php-cli when unit tests run. --- src/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.php b/src/App.php index 2f140ae..ef147c0 100644 --- a/src/App.php +++ b/src/App.php @@ -574,7 +574,7 @@ class App $timeToBootstrapMs = (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000; $bootstrapTooLongThresholdMs = 300; - if ($timeToBootstrapMs >= $bootstrapTooLongThresholdMs) { + if ($timeToBootstrapMs >= $bootstrapTooLongThresholdMs && php_sapi_name() != 'cli') { $this->logger->warning(sprintf('Bootstrap complete in %sms which is more than the threshold of %sms', number_format($timeToBootstrapMs, 2), $bootstrapTooLongThresholdMs)); }