nvanheuverzwijn / monolog-logdna

GNU Lesser General Public License v3.0
21 stars 20 forks source link

LogdnaHandler `write` declaration incompatible with AbstractProcessingHandler class #6

Closed carlosmds closed 2 years ago

carlosmds commented 4 years ago

Hi there,

I'm facing this issue while trying to use the monolog-logdna lib, because of it's declaration of write function, that is incompatible with the declaration inside AbstractProcessingHandler class wich is extended, just like this:

LogDnaHandler -> write declaration: protected function write(array $record)

AbstractProcessingHandler -> write declaration: abstract protected function write(array $record): void

The error message I get from exception: Declaration of Zwijn\\Monolog\\Handler\\LogdnaHandler::write(array $record) must be compatible with Monolog\\Handler\\AbstractProcessingHandler::write(array $record): void

I guess it needs the :void return declaration type, my Laravel version is ^6.2 and the LogDnaHandler is ^2.1.

Thank you in advance 😄

carlosmds commented 4 years ago

I saw there is already a pull request to fix it -> https://github.com/nvanheuverzwijn/monolog-logdna/pull/5

dr-matt-smith commented 2 years ago

not sure how active this project is here is link to my fork with fixes (I've made pull request too)

https://github.com/dr-matt-smith/monolog-logdna