luisdalmolin / laravel-mandrill-driver

Mandrill mail driver for Laravel for version 6+
MIT License
79 stars 38 forks source link

Not working in Laravel 9 #32

Closed radykal-com closed 2 years ago

radykal-com commented 2 years ago

Using the version 4 in Laravel 9 throws a Typed property Symfony\Component\Mailer\Transport\AbstractTransport::$dispatcher must not be accessed before initialization error due to the missing call to the AbstractTransport constructor

wblommaert commented 2 years ago

We're experiencing the same issue. Some additional context:

Our full stack trace:


Symfony\\Component\\Mailer\\Transport\\AbstractTransport::$dispatcher must not be accessed before initialization at /opt/approot/build.20220616-151057-6492dd38/vendor/symfony/mailer/Transport/AbstractTransport.php:61) [stacktrace]
#0 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(521): Symfony\\Component\\Mailer\\Transport\\AbstractTransport->send()
#1 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(285): Illuminate\\Mail\\Mailer->sendSymfonyMessage()
#2 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(210): Illuminate\\Mail\\Mailer->send()
#3 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\\Mail\\Mailable->Illuminate\\Mail\\{closure}()
#4 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(211): Illuminate\\Mail\\Mailable->withLocale()
#5 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php(65): Illuminate\\Mail\\Mailable->send()
#6 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Mail\\SendQueuedMailable->handle()
#7 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#8 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#9 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#10 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#11 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#12 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#13 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#14 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#15 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Bus\\Dispatcher->dispatchNow()
#16 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#17 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(125): Illuminate\\Pipeline\\Pipeline->then()
#19 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#20 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\\Queue\\CallQueuedHandler->call()
#21 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(428): Illuminate\\Queue\\Jobs\\Job->fire()
#22 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(378): Illuminate\\Queue\\Worker->process()
#23 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(172): Illuminate\\Queue\\Worker->runJob()
#24 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\\Queue\\Worker->daemon()
#25 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(114): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#26 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#27 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#28 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#29 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#30 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#31 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#32 /opt/approot/build.20220616-151057-6492dd38/vendor/symfony/console/Command/Command.php(308): Illuminate\\Console\\Command->execute()
#33 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#34 /opt/approot/build.20220616-151057-6492dd38/vendor/symfony/console/Application.php(998): Illuminate\\Console\\Command->run()
#35 /opt/approot/build.20220616-151057-6492dd38/vendor/symfony/console/Application.php(299): Symfony\\Component\\Console\\Application->doRunCommand()
#36 /opt/approot/build.20220616-151057-6492dd38/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#37 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#38 /opt/approot/build.20220616-151057-6492dd38/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run()
#39 /opt/approot/build.20220616-151057-6492dd38/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#40 {main}
radykal-com commented 2 years ago

@wblommaert your scenario is the same as ours (mailable being queued) the fix from #33 is working for us

wblommaert commented 2 years ago

@radykal-com That fix works indeed. We're currently using your fork as a drop-in replacement until the PR gets merged. Thanks!

Pab89 commented 2 years ago

Please merge the request, it also works here. :) +1

overwise commented 2 years ago

So this won't be fixed anytime soon, I would say...