Skip to content

Declaration of LoggerWrapper::emergency() is not compatible with PSR logger interface #52

Open
HaruAtari opened this issue Jan 6, 2022 · 2 comments

Comments

@HaruAtari
Copy link

I have the next error after migration from the yandex-checkout-sdk-php on PHP 8:

Declaration of YooKassa\Common\LoggerWrapper::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void

I think it happens because the yandex-checkout-sdk-php used an older version of the psr/log package.

https://github.com/yoomoney/yandex-checkout-sdk-php/blob/master/composer.json#L10
https://github.com/yoomoney/yookassa-sdk-php/blob/master/composer.json#L20

Maybe it will be better to return back to "psr/log": "^1.0" to save PHP 5.3 as a minimal version?

@HaruAtari
Copy link
Author

HaruAtari commented Jan 6, 2022

This is related issue: #35

But psr/log 3 is not compatible with this package because of void return type declaration. It was implemented in PHP 7.1 so psr/log 3 can not be allowed for the package with support of PHP 5.3

@ostulov
Copy link

ostulov commented Jan 21, 2022

Hello!

Fixed in v2.2.6

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

No branches or pull requests

2 participants