From d9c06814f9a0fa05762aa6a0ecdae510619501b1 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 3 Apr 2020 16:59:55 +0200 Subject: [PATCH] [5.0][MonologBridge] Fix $level type --- src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php | 7 +++++-- src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php b/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php index 6152dece8f717..be60c7dcbf234 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 4016d402b9634..d6d0c5dabfbe4 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); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy