From 3f3b167e3dc6a56d36bb3f790c4dde8cb83c7387 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Mon, 28 Sep 2020 18:36:59 +0200 Subject: [PATCH] Quash some monolog debug explicitly when we're running tests. --- src/App.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.php b/src/App.php index 4b8ed33..a732f78 100644 --- a/src/App.php +++ b/src/App.php @@ -156,7 +156,9 @@ class App (new Filesystem())->mkdir($twigCachePath, 0777); } catch (IOException $IOException) { unset($twigSettings['cache']); - $this->getLogger()->warning(sprintf('Could not create Twig cache (%s), Twig cache disabled ', $twigCachePath)); + if (!in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) { + $this->getLogger()->warning(sprintf('Could not create Twig cache (%s), Twig cache disabled ', $twigCachePath)); + } } }