From ef7bb430b7fb14b7d307a2c328fadcdcc9f73701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 7 Dec 2023 11:47:53 +0100 Subject: [PATCH 1/2] Lower setup check level from error/warning to warning/info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/SetupChecks/LogErrors.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SetupChecks/LogErrors.php b/lib/SetupChecks/LogErrors.php index abea9ab8c..6681ebacd 100644 --- a/lib/SetupChecks/LogErrors.php +++ b/lib/SetupChecks/LogErrors.php @@ -74,7 +74,7 @@ public function run(): SetupResult { if (array_sum($count) === 0) { return SetupResult::success($this->l10n->t('No errors in the logs since %s', $this->dateFormatter->formatDate($limit))); } elseif ($count[self::LEVEL_ERROR] + $count[self::LEVEL_FATAL] > 0) { - return SetupResult::error( + return SetupResult::warning( $this->l10n->n( '%n error in the logs since %s', '%n errors in the logs since %s', @@ -83,7 +83,7 @@ public function run(): SetupResult { ) ); } else { - return SetupResult::warning( + return SetupResult::info( $this->l10n->n( '%n warning in the logs since %s', '%n warnings in the logs since %s'.json_encode($count), From ffc782a67b4fe213fc242c18448d281632611e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 7 Dec 2023 12:16:40 +0100 Subject: [PATCH 2/2] Adapt tests to severity change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/Unit/SetupChecks/LogErrorsTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Unit/SetupChecks/LogErrorsTest.php b/tests/Unit/SetupChecks/LogErrorsTest.php index a4e0bf6d1..3d803108f 100644 --- a/tests/Unit/SetupChecks/LogErrorsTest.php +++ b/tests/Unit/SetupChecks/LogErrorsTest.php @@ -60,10 +60,10 @@ public function logProvider(): array { $tooOld = (new \DateTime('1 month ago'))->format(\DateTime::ATOM); return [ [[], 'success'], - [[['level' => 2, 'time' => $now]], 'warning'], - [[['level' => 3, 'time' => $now]], 'error'], - [[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'error'], - [[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'warning'], + [[['level' => 2, 'time' => $now]], 'info'], + [[['level' => 3, 'time' => $now]], 'warning'], + [[['level' => 2, 'time' => $now],['level' => 3, 'time' => $now]], 'warning'], + [[['level' => 2, 'time' => $now],['level' => 3, 'time' => $tooOld]], 'info'], [[['level' => 2, 'time' => $tooOld],['level' => 3, 'time' => $tooOld]], 'success'], ]; }