monolog-bundle icon indicating copy to clipboard operation
monolog-bundle copied to clipboard

Ensure all handlers are explicitly closed on kernel shutdown

Open andy-educake opened this issue 5 years ago • 2 comments

andy-educake avatar Nov 24 '20 10:11 andy-educake

Thanks for the comments @lyrixx Have dealt with all of them I think. I notice that Travis has failed for PHP 5.6 and PHP 7.0. Possibly because I used the iterable type hint on the constructor param. Should I use the Iterator interface instead for bc?

andy-educake avatar Nov 24 '20 13:11 andy-educake

Regarding a generic solution in symfony, I think we need something similar to the ServiceResetter, but which is always called by the kernel on shutdown, for services which need to close some resources for their shutdown. This way, MonologBundle could hook the close method of handlers in there, DoctrineBundle could hook connections, etc...

stof avatar Nov 27 '20 11:11 stof