The Magento Framework version ^103.0.5 on Magento >=2.4.5 requires monolog/monolog version >=2.7
"name": "magento/framework"
"version": "103.0.5"
...
"require": { "monolog/monolog": "^2.7"
In this version the signature of the method \Monolog\Logger::addRecord has been changed and is not compatible anymore with the class \Gigya\GigyaIM\Logger\Logger which extends the class \Monolog\Logger and overrides that method.
This is why when bin/magento setup:upgrade is run the following warning is thrown:
Warning: Declaration of Gigya\GigyaIM\Logger\Logger::addRecord(int $level, string $message, array $context = Array): bool should be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = Array, ?Monolog\DateTimeImmutable $datetime = NULL): bool in /var/www/html/vendor/gigya/magento2-im/Logger/Logger.php on line 43
Tested in:
Magento Commerce 2.4.5
Magento Framework version: 103.0.5
PHP ^7.4
And it become worse on Magento Commerce 2.4.5-p2 with Magento framework 103.0.5-p2 on PHP ^8.1 because now a fatal error is thrown.
PHP Fatal error: Declaration of Gigya\GigyaIM\Logger\Logger::addRecord(int $level, string $message, array $context = []): bool must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = [], ?Monolog\DateTimeImmutable $datetime = null): bool in /var/www/html/vendor/gigya/magento2-im/Logger/Logger.php on line 43
We are using the version 6.0.0 of the module.
Could you please check.
Thank you.
The Magento Framework version
^103.0.5on Magento>=2.4.5requiresmonolog/monologversion>=2.7"name": "magento/framework""version": "103.0.5"...
"require": { "monolog/monolog": "^2.7"In this version the signature of the method
\Monolog\Logger::addRecordhas been changed and is not compatible anymore with the class\Gigya\GigyaIM\Logger\Loggerwhich extends the class\Monolog\Loggerand overrides that method.This is why when
bin/magento setup:upgradeis run the following warning is thrown:Warning: Declaration of Gigya\GigyaIM\Logger\Logger::addRecord(int $level, string $message, array $context = Array): bool should be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = Array, ?Monolog\DateTimeImmutable $datetime = NULL): bool in /var/www/html/vendor/gigya/magento2-im/Logger/Logger.php on line 43Tested in:
Magento Commerce
2.4.5Magento Framework version: 103.0.5
PHP ^7.4And it become worse on Magento Commerce
2.4.5-p2with Magento framework 103.0.5-p2 onPHP ^8.1because now a fatal error is thrown.PHP Fatal error: Declaration of Gigya\GigyaIM\Logger\Logger::addRecord(int $level, string $message, array $context = []): bool must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = [], ?Monolog\DateTimeImmutable $datetime = null): bool in /var/www/html/vendor/gigya/magento2-im/Logger/Logger.php on line 43We are using the version 6.0.0 of the module.
Could you please check.
Thank you.