From b96f9820aaf1ff9afe945207883149e1c7afb298 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Wed, 9 Feb 2022 08:52:32 +0100 Subject: [PATCH] Skip Mailer in Laravel 9 Fixes #1289 --- src/LaravelDebugbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LaravelDebugbar.php b/src/LaravelDebugbar.php index 61e168e7a..1842aa5de 100644 --- a/src/LaravelDebugbar.php +++ b/src/LaravelDebugbar.php @@ -450,7 +450,7 @@ function ($event, $params) use ($queryCollector) { } } - if ($this->shouldCollect('mail', true) && class_exists('Illuminate\Mail\MailServiceProvider')) { + if ($this->shouldCollect('mail', true) && class_exists('Illuminate\Mail\MailServiceProvider') && $this->checkVersion('9.0', '<')) { try { $mailer = $this->app['mailer']->getSwiftMailer(); $this->addCollector(new SwiftMailCollector($mailer));