PHP PSR Logger Error |
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)
this is my composer.json:
Code: { ran : Code: [andrew@darkstar ~]$ cd /srv/http/CI4-CMS
If you want to use psr/log v3, upgrade to CI 4.5.
See https://github.com/codeigniter4/CodeIgniter4/pull/8339
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.
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 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |