Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2.4.5 monolog/monolog compatibility. #137

Open
sergiuec opened this issue Apr 28, 2023 · 0 comments
Open

Magento 2.4.5 monolog/monolog compatibility. #137

sergiuec opened this issue Apr 28, 2023 · 0 comments

Comments

@sergiuec
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant