From d9da854f78dcf9757f861e787fb16a2a43093c84 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Mon, 12 Dec 2022 15:22:01 +1300 Subject: [PATCH] DEP PHP Support in CMS5 --- _config.php | 5 ----- composer.json | 14 +++++++------- src/Utils/Logging/QueuedJobLogHandler.php | 3 ++- tests/SolrReindexTest/SolrReindexTest_Handler.php | 3 ++- 4 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 _config.php diff --git a/_config.php b/_config.php deleted file mode 100644 index 31684ea9..00000000 --- a/_config.php +++ /dev/null @@ -1,5 +0,0 @@ -queuedJob; } - protected function write(array $record) + protected function write(LogRecord $record): void { // Write formatted message $this->getQueuedJob()->addMessage($record['formatted']); diff --git a/tests/SolrReindexTest/SolrReindexTest_Handler.php b/tests/SolrReindexTest/SolrReindexTest_Handler.php index ea29bcdd..74babba4 100644 --- a/tests/SolrReindexTest/SolrReindexTest_Handler.php +++ b/tests/SolrReindexTest/SolrReindexTest_Handler.php @@ -3,6 +3,7 @@ namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest; use Monolog\Handler\AbstractProcessingHandler; +use Monolog\LogRecord; use SilverStripe\Dev\TestOnly; /** @@ -32,7 +33,7 @@ public function clear() $this->messages = array(); } - protected function write(array $record) + protected function write(LogRecord $record): void { $this->messages[] = $record['message']; }