Skip to content

Conversation

jbeales
Copy link

@jbeales jbeales commented Sep 16, 2019

Supports Laravel 6, (with Monolog 2).

Summary

  • Changed the signature of MailableHandler::send() to match the new signature of Monolog\Handler\MailHandler::send() that it's inheriting from.
  • Changed the signature of the MailableHandler::__construct() to force int and bool types for $level and $bool, respectively, (they're passed to Monolog\Handler\AbstractHandler::__construct() which requires int & bool).
  • Added default debug level and bubble config in MailableLogger::__invoke(). If $level and $bubble are not set, and the correct types, instantiating a new MailableHandler, (or any handler), fails silently.

Notes:

  • I haven't bumped the version or anything. I believe this will still work with Laravel 5, but haven't tested.
  • If someone puts an invalid value for level or bubble in their config file the logger will fail silently.

Especially from a place that may not be available, and when we're about
to load them again in the boot() method.

(Fixes a fatal error running artisan view:cache)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants