Welcome Guest, Not a member yet? Register   Sign In
Update to v4.5.1, same using FactoriesCache
#1

I updated from 4.4.x to 4.51, Follow instruction upgrading. I clear cache first created by 4.4.x, and open again in browser with local computer give SUCCESS. But with environment dev server same as clear cache first appear ERROR

Fatal error: Declaration of CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /home/http8_data/xxx/vendor/codeigniter4/framework/system/Log/Logger.php on line 162

This is related to FactoriesCache? What a problem?
Reply
#2

(04-17-2024, 07:39 AM)ddevsr Wrote: This is related to FactoriesCache?

If you think so, disable the cache and try again.
Reply
#3

(04-17-2024, 07:39 AM)ddevsr Wrote: Fatal error: Declaration of CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /home/http8_data/xxx/vendor/codeigniter4/framework/system/Log/Logger.php on line 162

What a problem?

The error message tells the problem.

Declaration of
PHP Code:
CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void 

must be compatible with
PHP Code:
PsrExt\Log\LoggerInterface::emergency($message, array $context = []) 
Reply
#4

(This post was last modified: 04-17-2024, 06:53 PM by ddevsr.)

(04-17-2024, 03:41 PM)kenjis Wrote:
(04-17-2024, 07:39 AM)ddevsr Wrote: Fatal error: Declaration of CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /home/http8_data/xxx/vendor/codeigniter4/framework/system/Log/Logger.php on line 162

What a problem?

The error message tells the problem.

Declaration of
PHP Code:
CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void 

must be compatible with
PHP Code:
PsrExt\Log\LoggerInterface::emergency($message, array $context = []) 

I don't extend PsrExt\Log\LoggerInterface at all

Local computer = PHP 8.3.4
Dev Server = PHP 8.3.6

[Image: ssss.png]
Reply
#5

Ah, remove psr extention. It is outdated.
https://github.com/jbboehr/php-psr
Reply
#6

(This post was last modified: 04-25-2024, 08:31 AM by xsPurX.)

(04-17-2024, 07:47 PM)kenjis Wrote: Ah, remove psr extention. It is outdated.
https://github.com/jbboehr/php-psr
how do you remove it?
Reply
#7

Remove the line in your php.ini:
extension=psr.so
Reply




Theme © iAndrew 2016 - Forum software by © MyBB