amazon-pay-sdk-php
amazon-pay-sdk-php copied to clipboard
Ambiguous LoggerInterface
The SDK ships it's own version of Psr\Log\LoggerInterface
which causes some IDEs (like PHPStorm) to remark an ambiguity when composer is used to install the real Psr\Log\LoggerInterface
which is available twice then.
Currently, I have to fork this SDK and remove the Psr\Log\LoggerInterface
to get rid of that remark.
I see the following solution:
- Add an adapter-interface and an adapter for
Psr\Log\LoggerInterface
and also an default-adapter shipped with the SDK. - Remove
Psr\Log\LoggerInterface
-Files from the project and depend on composer alone. There is currently no implementation other thanNullLogger
shipped with the SDK so the interface alone makes not much sense. The interface-typehint will work without the interface-files. Usinguse
and typehinting don't require the actualinterface
to be present.
OR
- Publish a repository which only consists of files from the directoy
/AmazonPay
and/tst
.
Seconded!
As mentioned in the existing PR i also appreciate this.
I've come here to post this same comment.
In 2023 the same problem
i am facing same problem with laravel 10