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 15, 2023
1 parent d346a87 commit 01bf9b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions code/DebugBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion code/Messages/LogFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
"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": {
Expand Down

0 comments on commit 01bf9b6

Please sign in to comment.