mccarlosen / laravel-mpdf

Generate PDFs in Laravel with Mpdf.
403 stars 107 forks source link

LoggerInterface Issue #110

Closed sgtcoder closed 1 year ago

sgtcoder commented 1 year ago

With the latest update we are getting this error again:

Declaration of Mpdf\Mpdf::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void
mccarlosen commented 1 year ago

Hello! What version of Laravel and PHP are you using? This is a bug inherent in mPDF. You can find more information on the subject here: Issue

sgtcoder commented 1 year ago

Latest version of Laravel 9. And PHP 8.1.

So do I contact mpdf?

mccarlosen commented 1 year ago

Delete the composer.lock file in your laravel project and install the latest version of mPDF. Run this command:

composer require mpdf/mpdf 8.1.0

sgtcoder commented 1 year ago

Hi, thank you, that worked.