cancel
Showing results for 
Search instead for 
Did you mean: 

Compatibility Issue with Magestore Module on Magento 2.4.8 (PHP 8.3, Composer 2.7.1)

Compatibility Issue with Magestore Module on Magento 2.4.8 (PHP 8.3, Composer 2.7.1)

Dear Magento Support Team,

 

We are currently encountering a compatibility issue with the Magestore module in our Magento project after upgrading from Magento 2.4.2 to Magento 2.4.8. Our environment is now using PHP 8.3 and Composer 2.7.1.

During the upgrade process, we are seeing the following fatal error:

 

php bin/magento setup:upgrade
PHP Fatal error: Declaration of Magestore\Logger\Logger\MagestoreLogger::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in /var/www/html/magento5/app/code/Magestore/Logger/Logger/MagestoreLogger.php on line 794
 

It appears the issue is related to a method signature mismatch in the MagestoreLogger class, which is no longer compatible with the updated PSR-3 LoggerInterface used in the newer Magento version.

We would appreciate your urgent assistance in providing either:

A compatible version of the module that supports Magento 2.4.8 and PHP 8.3
or
Clear guidance on how to update the existing code to resolve this issue

Please let us know if there is an official patch or updated package available.

Looking forward to your prompt support and resolution.

 
Thanks,

Padma

 

3 REPLIES 3

Re: Compatibility Issue with Magestore Module on Magento 2.4.8 (PHP 8.3, Composer 2.7.1)

Hello @padmachhat5f0d ,

I suggest to generate support ticket with magestore. As it might be related to paid module you can get update or patch version quickly from them.

 

If you’d prefer to patch in-place, you can update each of the PSR-3 methods in
app/code/Magestore/Logger/Logger/MagestoreLogger.php.

For example, change this:

public function emergency($message, array $context = [])
{
// …
}

to this:

// NEW: PHP 8.3 / PSR-3 compatible
public function emergency(\Stringable|string $message, array $context = []): void
{
parent::emergency($message, $context);
}

 

You’ll need to apply the same signature change (adding \Stringable|string and : void) for all of:

alert(...)

critical(...)

error(...)

warning(...)

notice(...)

info(...)

debug(...)

log($level, \Stringable|string $message, array $context = []): void

 

Once patched, run:

bin/magento setup:di:compile
bin/magento cache:flush

 

and the fatal error should disappear.

 

Thanks,

Ankit

Ankit Jasani

Re: Compatibility Issue with Magestore Module on Magento 2.4.8 (PHP 8.3, Composer 2.7.1)

Hi @Ankit Jasani 

 

I have tried to do so but after that in another file error coming and after solving those while running setup:upgrade db error coming

Re: Compatibility Issue with Magestore Module on Magento 2.4.8 (PHP 8.3, Composer 2.7.1)

Hello @padmachhat5f0d ,

It seems might be you are not using compatible module so have you reached out to support for the similar issue for your magento version?

Thanks,

Ankit

Ankit Jasani