diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab46643..4a9a677 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,3 +14,4 @@ jobs: # Only run cron on the silverstripe account if: (github.event_name == 'schedule' && github.repository_owner == 'lekoala') || (github.event_name != 'schedule') uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 + composer_require_extra: silverstripe/subsites:^3 diff --git a/code/DebugBar.php b/code/DebugBar.php index 5ff2c24..7aa32a6 100644 --- a/code/DebugBar.php +++ b/code/DebugBar.php @@ -18,7 +18,7 @@ use DebugBar\Bridge\MonologCollector; use SilverStripe\Control\HTTPRequest; use DebugBar\DebugBar as BaseDebugBar; -use SilverStripe\Control\Email\Mailer; +use Symfony\Component\Mailer\MailerInterface; use SilverStripe\Core\Injector\Injector; use SilverStripe\Core\Config\ConfigLoader; use SilverStripe\Core\Config\Configurable; @@ -208,7 +208,7 @@ public static function initDebugBar() // Email logging if (self::config()->email_collector) { - $mailer = Injector::inst()->get(Mailer::class); + $mailer = Injector::inst()->get(MailerInterface::class); if ($mailer instanceof SwiftMailer) { $swiftInst = $mailer->getSwiftMailer(); $debugbar['messages']->aggregate(new SwiftLogCollector($swiftInst)); diff --git a/code/Messages/LogFormatter.php b/code/Messages/LogFormatter.php index 286a499..6ec56aa 100644 --- a/code/Messages/LogFormatter.php +++ b/code/Messages/LogFormatter.php @@ -3,13 +3,14 @@ namespace LeKoala\DebugBar\Messages; use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; /** * Formats incoming log messages for display in the debug bar */ class LogFormatter implements FormatterInterface { - public function format(array $record) + public function format(array|LogRecord $record) { return $record['message']; } diff --git a/composer.json b/composer.json index 8923894..59b6e85 100644 --- a/composer.json +++ b/composer.json @@ -16,17 +16,17 @@ } ], "require": { - "php": "^7.4 || ^8.0", - "silverstripe/framework": "^4.0", - "maximebf/debugbar": "^1.13", + "php": "^8.1", + "silverstripe/framework": "^5", + "maximebf/debugbar": "^1.18", "jdorn/sql-formatter": "1.3.x-dev", - "tractorcow/silverstripe-proxy-db": "^1.0" + "silverstripe/silverstripe-proxy-db": "^2" }, "require-dev": { - "silverstripe/siteconfig": "^4.0", - "silverstripe/admin": "^1.0", + "silverstripe/siteconfig": "^5", + "silverstripe/admin": "^2", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3" }, "extra": { "branch-alias": {