BinaryDriver icon indicating copy to clipboard operation
BinaryDriver copied to clipboard

Fatal error after calling setLogger

Open jrm0695 opened this issue 4 years ago • 1 comments

https://github.com/alchemy-fr/BinaryDriver/blob/e0615cdff315e6b4b05ada67906df6262a020d22/src/Alchemy/BinaryDriver/ProcessRunner.php#L43

A new bug appeared with the recent update of psr/log v3. The ProcessRunnerInterface from psr/log version 3 provides a setLogger function that returns a void. PHP 8.0.12 now enforce that you declare the right return type when implementing interfaces.

As it currently return a ProcessRunner, I end up with this error when using it : Declaration of Alchemy\BinaryDriver\ProcessRunner::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void

Either return a void to comply to the interface, either get back to psr/log version 1 that doesn't provide any return type

jrm0695 avatar Nov 14 '21 01:11 jrm0695

I have similar issue, I would like to use this package with psr/log: ^3.0 . Would that be possible to upgrade? Version 5.2.0 requires psr/log: ^1.0. Thank You!

BilboTav avatar Nov 24 '21 12:11 BilboTav