amzn/amazon-pay-sdk-php

Ambiguous LoggerInterface

Opened this issue · 5 comments

rkrx commented

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 than NullLogger shipped with the SDK so the interface alone makes not much sense. The interface-typehint will work without the interface-files. Using use and typehinting don't require the actual interface to be present.

OR

  • Publish a repository which only consists of files from the directoy /AmazonPay and /tst.
ejegg commented

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