diff --git a/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php b/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php index 6152dece8f71..be60c7dcbf23 100644 --- a/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php @@ -26,11 +26,14 @@ class NotifierHandler extends AbstractHandler { private $notifier; - public function __construct(NotifierInterface $notifier, int $level = Logger::ERROR, bool $bubble = true) + /** + * @param string|int $level The minimum logging level at which this handler will be triggered + */ + public function __construct(NotifierInterface $notifier, $level = Logger::ERROR, bool $bubble = true) { $this->notifier = $notifier; - parent::__construct($level < Logger::ERROR ? Logger::ERROR : $level, $bubble); + parent::__construct(Logger::toMonologLevel($level) < Logger::ERROR ? Logger::ERROR : $level, $bubble); } public function handle(array $record): bool diff --git a/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php b/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php index 4016d402b963..d6d0c5dabfbe 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php @@ -54,7 +54,10 @@ trait ServerLogHandlerTrait private $context; private $socket; - public function __construct(string $host, int $level = Logger::DEBUG, bool $bubble = true, array $context = []) + /** + * @param string|int $level The minimum logging level at which this handler will be triggered + */ + public function __construct(string $host, $level = Logger::DEBUG, bool $bubble = true, array $context = []) { parent::__construct($level, $bubble);