amazon-pay-sdk-php icon indicating copy to clipboard operation
amazon-pay-sdk-php copied to clipboard

Ambiguous LoggerInterface

Open rkrx opened this issue 7 years ago • 5 comments

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.

rkrx avatar Aug 01 '17 13:08 rkrx

Seconded!

ejegg avatar Aug 09 '17 23:08 ejegg

As mentioned in the existing PR i also appreciate this.

nlubisch avatar Dec 27 '17 23:12 nlubisch

I've come here to post this same comment.

theromulans avatar Oct 15 '19 05:10 theromulans

In 2023 the same problem

marcelloinfoweb avatar Jan 12 '23 17:01 marcelloinfoweb

i am facing same problem with laravel 10

ahmad562 avatar May 24 '23 16:05 ahmad562