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 0239d15

Browse filesBrowse files
committed
[MonologBridge] remove deprecated features
1 parent 31f74ca commit 0239d15
Copy full SHA for 0239d15

File tree

3 files changed

+1
-131
lines changed
Filter options

3 files changed

+1
-131
lines changed

‎src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php
+1-17Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,8 @@ class ConsoleFormatter implements FormatterInterface
5555
* * colors: If true, the log string contains ANSI code to add color;
5656
* * multiline: If false, "context" and "extra" are dumped on one line.
5757
*/
58-
public function __construct($options = array())
58+
public function __construct(array $options = array())
5959
{
60-
// BC Layer
61-
if (!is_array($options)) {
62-
@trigger_error(sprintf('The constructor arguments $format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra of "%s" are deprecated since 3.3 and will be removed in 4.0. Use $options instead.', self::class), E_USER_DEPRECATED);
63-
$args = func_get_args();
64-
$options = array();
65-
if (isset($args[0])) {
66-
$options['format'] = $args[0];
67-
}
68-
if (isset($args[1])) {
69-
$options['date_format'] = $args[1];
70-
}
71-
if (isset($args[2])) {
72-
$options['multiline'] = $args[2];
73-
}
74-
}
75-
7660
$this->options = array_replace(array(
7761
'format' => self::SIMPLE_FORMAT,
7862
'date_format' => self::SIMPLE_DATE,

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
-64Lines changed: 0 additions & 64 deletions
This file was deleted.

‎src/Symfony/Bridge/Monolog/Tests/LoggerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Tests/LoggerTest.php
-50Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,11 @@
1313

1414
use Monolog\Handler\TestHandler;
1515
use PHPUnit\Framework\TestCase;
16-
use Symfony\Bridge\Monolog\Handler\DebugHandler;
1716
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
1817
use Symfony\Bridge\Monolog\Logger;
1918

2019
class LoggerTest extends TestCase
2120
{
22-
/**
23-
* @group legacy
24-
*/
25-
public function testGetLogsWithDebugHandler()
26-
{
27-
$handler = new DebugHandler();
28-
$logger = new Logger(__METHOD__, array($handler));
29-
30-
$this->assertTrue($logger->error('error message'));
31-
$this->assertSame(1, count($logger->getLogs()));
32-
}
33-
3421
public function testGetLogsWithoutDebugProcessor()
3522
{
3623
$handler = new TestHandler();
@@ -40,43 +27,6 @@ public function testGetLogsWithoutDebugProcessor()
4027
$this->assertSame(array(), $logger->getLogs());
4128
}
4229

43-
/**
44-
* @group legacy
45-
*/
46-
public function testCountErrorsWithDebugHandler()
47-
{
48-
$handler = new DebugHandler();
49-
$logger = new Logger(__METHOD__, array($handler));
50-
51-
$this->assertTrue($logger->debug('test message'));
52-
$this->assertTrue($logger->info('test message'));
53-
$this->assertTrue($logger->notice('test message'));
54-
$this->assertTrue($logger->warning('test message'));
55-
56-
$this->assertTrue($logger->error('test message'));
57-
$this->assertTrue($logger->critical('test message'));
58-
$this->assertTrue($logger->alert('test message'));
59-
$this->assertTrue($logger->emergency('test message'));
60-
61-
$this->assertSame(4, $logger->countErrors());
62-
}
63-
64-
/**
65-
* @group legacy
66-
*/
67-
public function testGetLogsWithDebugHandler2()
68-
{
69-
$logger = new Logger('test');
70-
$logger->pushHandler(new DebugHandler());
71-
72-
$logger->addInfo('test');
73-
$this->assertCount(1, $logger->getLogs());
74-
list($record) = $logger->getLogs();
75-
76-
$this->assertEquals('test', $record['message']);
77-
$this->assertEquals(Logger::INFO, $record['priority']);
78-
}
79-
8030
public function testCountErrorsWithoutDebugProcessor()
8131
{
8232
$handler = new TestHandler();

0 commit comments

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