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 16, 2023
1 parent d346a87 commit 9ada1e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
14 changes: 7 additions & 7 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"
"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": {
Expand Down

0 comments on commit 9ada1e5

Please sign in to comment.