Skip to content

Commit

Permalink
DEP PHP Support in CMS5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jan 13, 2023
1 parent d666c4f commit d9da854
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
5 changes: 0 additions & 5 deletions _config.php

This file was deleted.

14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"silverstripe/framework": "^4.10",
"monolog/monolog": "~1.15",
"php": "^8.1",
"silverstripe/framework": "^5",
"monolog/monolog": "^3.2",
"silverstripe/solr-php-client": "^1.0",
"symfony/process": "^3.4 || ^4",
"symfony/process": "^6.2",
"tractorcow/silverstripe-proxy-db": "^1",
"ext-curl": "*"
},
"require-dev": {
"silverstripe/cms": "^4.0",
"silverstripe/cms": "^5",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.0",
"symbiote/silverstripe-queuedjobs": "^4.9"
"squizlabs/php_codesniffer": "^3",
"symbiote/silverstripe-queuedjobs": "^5"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Utils/Logging/QueuedJobLogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SilverStripe\FullTextSearch\Utils\Logging;

use Monolog\Handler\AbstractProcessingHandler;
use Monolog\LogRecord;
use Monolog\Logger;
use Symbiote\QueuedJobs\Services\QueuedJob;

Expand Down Expand Up @@ -53,7 +54,7 @@ public function getQueuedJob()
return $this->queuedJob;
}

protected function write(array $record)
protected function write(LogRecord $record): void
{
// Write formatted message
$this->getQueuedJob()->addMessage($record['formatted']);
Expand Down
3 changes: 2 additions & 1 deletion tests/SolrReindexTest/SolrReindexTest_Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest;

use Monolog\Handler\AbstractProcessingHandler;
use Monolog\LogRecord;
use SilverStripe\Dev\TestOnly;

/**
Expand Down Expand Up @@ -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'];
}
Expand Down

0 comments on commit d9da854

Please sign in to comment.