0
Welcome Guest! Login
0 items Join Now

SOLVED Compile Error: Declaration of Psr\Log\NullLogger

  • SOLVED Compile Error: Declaration of Psr\Log\NullLogger

    Posted 6 months 2 weeks ago
    • I have been trying to set up login using PassKey but after signing in the following error is thrown:
      Compile Error: Declaration of Psr\Log\NullLogger::log($level, $message, array $context = []) must be compatible with Psr\Log\AbstractLogger::log($level, Stringable|string $message, array $context = []): void

      After a bit of Googling I was able to fix the error by editing /libraries/gantry5/vendor/psr/log/Psr/Log/NullLogger.php

      Replace line 26
      public function log($level, $message, array $context = array())

      with
      public function log($level, $message, array $context = []): void
  • Re: SOLVED Compile Error: Declaration of Psr\Log\NullLogger

    Posted 6 months 2 weeks ago
    • Not quite the exact same situation but I updated to Joomla 5 now from Joomla 4 and I was also getting this error.

      Did the change you made above and it resolved it.

      Hopefully the next version of Gantry can incorporate this so it isn't a manual fix everytime.
  • Re: SOLVED Compile Error: Declaration of Psr\Log\NullLogger

    Posted 6 months 2 weeks ago
    • Hi Shane

      Yes it fixed the error but I don't think there is a way of creating an override to prevent it from being updated. I have posted it to the Joomla forum so perhaps it might get picked up.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22234
    • Thanks: 3219
    • messin' with stuff

    Re: SOLVED Compile Error: Declaration of Psr\Log\NullLogger

    Posted 6 months 2 weeks ago
    • Trevor, are you able to submit a pull request for that here?

      github.com/gantry/gantry5/pulls
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: SOLVED Compile Error: Declaration of Psr\Log\NullLogger

    Posted 6 months 2 weeks ago
    • Hi Matt

      It has been done.

      Best regards
      Trevor
    • The following users have thanked you: Matt, Christophe Lance

Time to create page: 0.039 seconds