stripe-php icon indicating copy to clipboard operation
stripe-php copied to clipboard

Allow passing PSR-3 loggers to setLogger as they are compatible

Open Seldaek opened this issue 2 years ago • 4 comments

IMO you should really just use PSR-3 and require psr/log as it is anyway part of almost every PHP project at this point.. but at least this allows setting things up without getting static analysis warnings.

Seldaek avatar Jun 14 '22 12:06 Seldaek

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 14 '22 12:06 CLAassistant

Thank you for the contribution @Seldaek and sorry about the delay! I'll discuss this with the team and get back to you but I think this makes a ton of sense!

dcr-stripe avatar Jul 28 '22 22:07 dcr-stripe

Hi @Seldaek - this looks good to me! I've brought your branch up to head - there's a small linter error:


     /**
-     * @param Util\LoggerInterface|\Psr\Log\LoggerInterface $logger the logger to which the library
+     * @param \Psr\Log\LoggerInterface|Util\LoggerInterface $logger the logger to which the library
      *   will produce messages
      */

Do you mind applying this change, and then I can give this an approval and merge?

Thank you for the contribution!

dcr-stripe avatar Aug 08 '22 20:08 dcr-stripe

Sure, done.

Seldaek avatar Aug 11 '22 06:08 Seldaek