Merge pull request #335 from creative-commoners/pulls/4/upgrade-cms5

DEP PHP Support in CMS5
This commit is contained in:
Maxime Rainville 2023-01-17 10:21:10 +13:00 committed by GitHub
commit fc415c33dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 16 deletions

View File

@ -17,4 +17,4 @@ jobs:
with: with:
extra_jobs: | extra_jobs: |
- name_suffix: subsites - name_suffix: subsites
composer_require_extra: silverstripe/subsites:^2 composer_require_extra: silverstripe/subsites:^3

View File

@ -1,5 +0,0 @@
<?php
use SilverStripe\Dev\Deprecation;
Deprecation::notification_version('3.0', 'silverstripe/fulltextsearch');

View File

@ -21,19 +21,19 @@
} }
], ],
"require": { "require": {
"php": "^7.4 || ^8.0", "php": "^8.1",
"silverstripe/framework": "^4.10", "silverstripe/framework": "^5",
"monolog/monolog": "~1.15", "monolog/monolog": "^3.2",
"silverstripe/solr-php-client": "^1.0", "silverstripe/solr-php-client": "^1.0",
"symfony/process": "^3.4 || ^4", "symfony/process": "^6.2",
"tractorcow/silverstripe-proxy-db": "^1", "silverstripe/silverstripe-proxy-db": "^2",
"ext-curl": "*" "ext-curl": "*"
}, },
"require-dev": { "require-dev": {
"silverstripe/cms": "^4.0", "silverstripe/cms": "^5",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.0", "squizlabs/php_codesniffer": "^3",
"symbiote/silverstripe-queuedjobs": "^4.9" "symbiote/silverstripe-queuedjobs": "^5"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -3,6 +3,7 @@
namespace SilverStripe\FullTextSearch\Utils\Logging; namespace SilverStripe\FullTextSearch\Utils\Logging;
use Monolog\Handler\AbstractProcessingHandler; use Monolog\Handler\AbstractProcessingHandler;
use Monolog\LogRecord;
use Monolog\Logger; use Monolog\Logger;
use Symbiote\QueuedJobs\Services\QueuedJob; use Symbiote\QueuedJobs\Services\QueuedJob;
@ -53,7 +54,7 @@ class QueuedJobLogHandler extends AbstractProcessingHandler
return $this->queuedJob; return $this->queuedJob;
} }
protected function write(array $record) protected function write(LogRecord $record): void
{ {
// Write formatted message // Write formatted message
$this->getQueuedJob()->addMessage($record['formatted']); $this->getQueuedJob()->addMessage($record['formatted']);

View File

@ -3,6 +3,7 @@
namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest; namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest;
use Monolog\Handler\AbstractProcessingHandler; use Monolog\Handler\AbstractProcessingHandler;
use Monolog\LogRecord;
use SilverStripe\Dev\TestOnly; use SilverStripe\Dev\TestOnly;
/** /**
@ -32,7 +33,7 @@ class SolrReindexTest_Handler extends AbstractProcessingHandler implements TestO
$this->messages = array(); $this->messages = array();
} }
protected function write(array $record) protected function write(LogRecord $record): void
{ {
$this->messages[] = $record['message']; $this->messages[] = $record['message'];
} }