Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit acef571

Browse filesBrowse files
bug #46310 [MonologBridge] Fix LevelName being removed in Monolog 3.0 (Seldaek)
This PR was merged into the 6.1 branch. Discussion ---------- [MonologBridge] Fix LevelName being removed in Monolog 3.0 | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> A couple last fixes as follow-up to #46153 now that the Monolog 3.0.0 release is out. Commits ------- 7ba3e1a [MonologBridge] Fix LevelName being removed in Monolog 3.0
2 parents aad3e78 + 7ba3e1a commit acef571
Copy full SHA for acef571

File tree

4 files changed

+5
-7
lines changed
Filter options

4 files changed

+5
-7
lines changed

‎src/Symfony/Bridge/Monolog/Handler/ElasticsearchLogstashHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/ElasticsearchLogstashHandler.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Monolog\Handler\FormattableHandlerTrait;
1818
use Monolog\Handler\ProcessableHandlerTrait;
1919
use Monolog\Level;
20-
use Monolog\LevelName;
2120
use Monolog\Logger;
2221
use Monolog\LogRecord;
2322
use Symfony\Component\HttpClient\HttpClient;
@@ -61,7 +60,7 @@ class ElasticsearchLogstashHandler extends AbstractHandler
6160
*/
6261
private \SplObjectStorage $responses;
6362

64-
public function __construct(string $endpoint = 'http://127.0.0.1:9200', string $index = 'monolog', HttpClientInterface $client = null, string|int|Level|LevelName $level = Logger::DEBUG, bool $bubble = true)
63+
public function __construct(string $endpoint = 'http://127.0.0.1:9200', string $index = 'monolog', HttpClientInterface $client = null, string|int|Level $level = Logger::DEBUG, bool $bubble = true)
6564
{
6665
if (!interface_exists(HttpClientInterface::class)) {
6766
throw new \LogicException(sprintf('The "%s" handler needs an HTTP client. Try running "composer require symfony/http-client".', __CLASS__));

‎src/Symfony/Bridge/Monolog/Handler/MailerHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/MailerHandler.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Monolog\Formatter\LineFormatter;
1717
use Monolog\Handler\AbstractProcessingHandler;
1818
use Monolog\Level;
19-
use Monolog\LevelName;
2019
use Monolog\Logger;
2120
use Monolog\LogRecord;
2221
use Symfony\Component\Mailer\MailerInterface;
@@ -34,7 +33,7 @@ class MailerHandler extends AbstractProcessingHandler
3433
private MailerInterface $mailer;
3534
private \Closure|Email $messageTemplate;
3635

37-
public function __construct(MailerInterface $mailer, callable|Email $messageTemplate, string|int|Level|LevelName $level = Logger::DEBUG, bool $bubble = true)
36+
public function __construct(MailerInterface $mailer, callable|Email $messageTemplate, string|int|Level $level = Logger::DEBUG, bool $bubble = true)
3837
{
3938
parent::__construct($level, $bubble);
4039

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\Monolog\Handler;
1313

1414
use Monolog\Handler\AbstractHandler;
15+
use Monolog\Level;
1516
use Monolog\Logger;
1617
use Monolog\LogRecord;
1718
use Symfony\Component\Notifier\Notification\Notification;
@@ -31,7 +32,7 @@ class NotifierHandler extends AbstractHandler
3132

3233
private NotifierInterface $notifier;
3334

34-
public function __construct(NotifierInterface $notifier, string|int|Level|LevelName $level = Logger::ERROR, bool $bubble = true)
35+
public function __construct(NotifierInterface $notifier, string|int|Level $level = Logger::ERROR, bool $bubble = true)
3536
{
3637
$this->notifier = $notifier;
3738

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Monolog\Handler\AbstractProcessingHandler;
1616
use Monolog\Handler\FormattableHandlerTrait;
1717
use Monolog\Level;
18-
use Monolog\LevelName;
1918
use Monolog\Logger;
2019
use Monolog\LogRecord;
2120
use Symfony\Bridge\Monolog\Formatter\VarDumperFormatter;
@@ -77,7 +76,7 @@ trait ServerLogHandlerTrait
7776
*/
7877
private $socket;
7978

80-
public function __construct(string $host, string|int|Level|LevelName $level = Logger::DEBUG, bool $bubble = true, array $context = [])
79+
public function __construct(string $host, string|int|Level $level = Logger::DEBUG, bool $bubble = true, array $context = [])
8180
{
8281
parent::__construct($level, $bubble);
8382

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.