8000 bug #36338 [5.0][MonologBridge] Fix $level type (fancyweb) · symfony/symfony@e0c1ee6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e0c1ee6

Browse files
committed
bug #36338 [5.0][MonologBridge] Fix $level type (fancyweb)
This PR was merged into the 5.0 branch. Discussion ---------- [5.0][MonologBridge] Fix $level type | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36334 (comment) | License | MIT | Doc PR | - Commits ------- d9c0681 [5.0][MonologBridge] Fix $level type
2 parents e1a522b + d9c0681 commit e0c1ee6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ class NotifierHandler extends AbstractHandler
2626
{
2727
private $notifier;
2828

29-
public function __construct(NotifierInterface $notifier, int $level = Logger::ERROR, bool $bubble = true)
29+
/**
30+
* @param string|int $level The minimum logging level at which this handler will be triggered
31+
*/
32+
public function __construct(NotifierInterface $notifier, $level = Logger::ERROR, bool $bubble = true)
3033
{
3134
$this->notifier = $notifier;
3235

33-
parent::__construct($level < Logger::ERROR ? Logger::ERROR : $level, $bubble);
36+
parent::__construct(Logger::toMonologLevel($level) < Logger::ERROR ? Logger::ERROR : $level, $bubble);
3437
}
3538

3639
public function handle(array $record): bool

src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ trait ServerLogHandlerTrait
5454
private $context;
5555
private $socket;
5656

57-
public function __construct(string $host, int $level = Logger::DEBUG, bool $bubble = true, array $context = [])
57+
/**
58+
* @param string|int $level The minimum logging level at which this handler will be triggered
59+
*/
60+
public function __construct(string $host, $level = Logger::DEBUG, bool $bubble = true, array $context = [])
5861
{
5962
parent::__construct($level, $bubble);
6063

0 commit comments

Comments
 (0)
0