2

i'm using codeigniter 4 and i try to implement Login with Google. so far so good until i got this error when i try to get the result. here the error message:

Fatal error: Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = []) in C:\xampp\htdocs\postlite\app\Libraries\vendor\monolog\monolog\src\Monolog\Logger.php on line 669

can anyone help me, please?

  • Edit your question to add your PHP version, and maybe the installed versions of the 2 packages involved. – AymDev Mar 10 '23 at 13:49
  • Which version of monolog are you using? If 3+, then it could be this known issue : https://github.com/composer/composer/issues/11246 – b126 Mar 10 '23 at 17:32
  • 1
    oh my god. you're right. the problem was on monolog and psr/log version. i solve it with just downgrading monolog to ^2.5 and psr/log version to ^2.0 in the composer Thanks a lot for the help. – Alipia Maulana Ibrahim Mar 11 '23 at 02:08

1 Answers1

0

For me the problem was enabled PHP PSR module. Laravel 10x does not use this module anymore. I disabled it on Ubuntu by running the command 'phpdismod psr' Hope this helps.