PHP PSR Logger Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: PHP PSR Logger Error (/showthread.php?tid=91772) |
PHP PSR Logger Error - occitan - 10-07-2024 I ran composer update and now I am getting the following error: My composer has "psr/log": "^3.0", I tried sudo dnf remove php8.2-psr but it was not found. Tried 8.1 and 8.3 too, I am running PHP 8.3.12. extension=psr.so isn't in my php.ini file. What else can I try? I read all the previous threads I can find but have no luck. This worked fine before I ran composer update. Codeigniter 4.4.4 Code: AH01071: Got error 'PHP message: PHP Fatal error: Declaration of CodeIgniter\\Log\\Logger::emergency($message, array $context = []): bool must be compatible with Psr\\Log\\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in /var/www/vhosts/domain.com/httpdocs/system/Log/Logger.php on line 159; PHP message: PHP Fatal error: Uncaught Error: Class "CodeIgniter\\Log\\Logger" not found in /var/www/vhosts/domain.com/httpdocs/system/Config/Services.php:401\nStack trace:\n#0 /var/www/vhosts/domain.com/httpdocs/system/Config/BaseService.php(258) RE: PHP PSR Logger Error - captain-sensible - 10-08-2024 this is my composer.json: Code: { ran : Code: [andrew@darkstar ~]$ cd /srv/http/CI4-CMS RE: PHP PSR Logger Error - kenjis - 10-09-2024 If you want to use psr/log v3, upgrade to CI 4.5. See https://github.com/codeigniter4/CodeIgniter4/pull/8339 RE: PHP PSR Logger Error - occitan - 10-09-2024 I changed my composer.json to "psr/log": "^2.0", and the error went away, but I feel like this is a bad idea. (10-09-2024, 05:20 PM)kenjis Wrote: If you want to use psr/log v3, upgrade to CI 4.5. RE: PHP PSR Logger Error - InsiteFX - 10-12-2024 You need to upgrade step by step and yes you will need to backup your app folder and make changes to it also to get to CodeIgniter v4.5.5 |