When I attempt to install CiviCRM (5.69.2) in my Jooma (5.0.2) instance I receive the following error:

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

I'm on PHP version 8.2.4.

Any help is appreciated!

Thanks, Jason

2 Answers 2


Sounds like there's a conflict between the copy of psr/log bundled with Civi and one already being used on your site. Can you give more details about which version exactly is present on your site and whether it's part of Joomla core or a Joomla plugin?

  • Sorry for my ignorance, but how do I find that detail? Is it the composer.json inside the com_civicrm folder?
    – thejason
    Jan 26 at 14:23
  • It could be anywhere! But that's a good place to start. A global grep of all .json files for the string "psr/log" would find it quickly.
    – Coleman
    Jan 26 at 19:17

NO, it's a CiviCRM error in com_civicrm/admin/civicrm/vendor/psr/log/Psr/Log/NullLogger.php, there line 26 must be changed form public function log($level, $message, array $context = array()) to public function log($level, $message, array $context = []): void.

Replace () through [], add the : void then CiviCRM installs without errors and works like a charm.

I tested this and can confirm this works.

  • Added a comment in the already opened issue: lab.civicrm.org/dev/joomla/-/issues/54
    – Guitarman
    Feb 7 at 21:33
  • @thejason: I'd suggest to wait for (hopefully) the next CiviCRM release. The change I proposed needs to be reviewed and implemented. In case you know CiviCRM and your environment very well, you could change the file using the code above, recompile and reinstall it. A solution that ALWAYS works is to install CiviCRM on Joomla 4.4.x and then upgrade Joomla to version 5.0.x.
    – Guitarman
    Feb 8 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.