nvanheuverzwijn / monolog-logdna

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

Allow pass Monolog\Level enum instance into LogdnaHandler constructor (update typedoc) #25

Closed slepic closed 9 months ago

slepic commented 9 months ago

Since monolog 3, it is possible to pass \Monolog\Level into the $level parameter of constructor of \Monolog\Handler\AbstractHandler and consequently the LogdnaHandler.

Althouth it is practically possible now since the types are not enforced at runtime, static analysis tools may report issues when instantiating the handler with Level instance.

monolog allowed

https://github.com/Seldaek/monolog/blob/3.0.0/src/Monolog/Handler/AbstractHandler.php#L36

since 3.x version of this lib supports only 3.x version of monolog, we should match the type of monolog 3.x