Skip to content

Commit 5f2d2d6

Browse files
committed
bug #188 Drop DebugHandlerPass (nicolas-grekas)
This PR was merged into the 3.x-dev branch. Discussion ---------- Drop DebugHandlerPass Bug fix for 3.0 because this deprecated code should have been removed. Fixes #187 Commits ------- b46da89 Drop DebugHandlerPass
2 parents 0122716 + b46da89 commit 5f2d2d6

File tree

5 files changed

+0
-89
lines changed

5 files changed

+0
-89
lines changed

DependencyInjection/Compiler/DebugHandlerPass.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

DependencyInjection/Configuration.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@
231231
* - [level]: level name or int value, defaults to DEBUG
232232
* - [bubble]: bool, defaults to true
233233
*
234-
* - debug:
235-
* - [level]: level name or int value, defaults to DEBUG
236-
* - [bubble]: bool, defaults to true
237-
*
238234
* - loggly:
239235
* - token: loggly api token
240236
* - [level]: level name or int value, defaults to DEBUG
@@ -740,10 +736,6 @@ public function getConfigTreeBuilder()
740736
->thenInvalid('The source has to be specified to use a FlowdockHandler')
741737
->end()
742738
->end()
743-
->validate()
744-
->ifTrue(function ($v) { return isset($v['debug']); })
745-
->thenInvalid('The "debug" name cannot be used as it is reserved for the handler of the profiler')
746-
->end()
747739
->example(array(
748740
'syslog' => array(
749741
'type' => 'stream',

DependencyInjection/MonologExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
657657
case 'browser_console':
658658
case 'test':
659659
case 'null':
660-
case 'debug':
661660
$definition->setArguments(array(
662661
$handler['level'],
663662
$handler['bubble'],
@@ -713,7 +712,6 @@ private function getHandlerClassByType($handlerType)
713712
'browser_console' => 'Monolog\Handler\BrowserConsoleHandler',
714713
'firephp' => 'Symfony\Bridge\Monolog\Handler\FirePHPHandler',
715714
'chromephp' => 'Symfony\Bridge\Monolog\Handler\ChromePhpHandler',
716-
'debug' => 'Symfony\Bridge\Monolog\Handler\DebugHandler',
717715
'swift_mailer' => 'Symfony\Bridge\Monolog\Handler\SwiftMailerHandler',
718716
'native_mailer' => 'Monolog\Handler\NativeMailerHandler',
719717
'socket' => 'Monolog\Handler\SocketHandler',

MonologBundle.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\HttpKernel\Bundle\Bundle;
1919
use Symfony\Component\DependencyInjection\ContainerBuilder;
2020
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass;
21-
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass;
2221
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddProcessorsPass;
2322
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\FixEmptyLoggerPass;
2423

@@ -34,9 +33,6 @@ public function build(ContainerBuilder $container)
3433
parent::build($container);
3534

3635
$container->addCompilerPass($channelPass = new LoggerChannelPass());
37-
if (!class_exists('Symfony\Bridge\Monolog\Processor\DebugProcessor')) {
38-
$container->addCompilerPass(new DebugHandlerPass($channelPass));
39-
}
4036
$container->addCompilerPass(new FixEmptyLoggerPass($channelPass));
4137
$container->addCompilerPass(new AddProcessorsPass());
4238
$container->addCompilerPass(new AddSwiftMailerTransportPass());

Tests/DependencyInjection/MonologExtensionTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,6 @@ public function testExceptionWhenUsingServiceWithoutId()
166166
$loader->load(array(array('handlers' => array('main' => array('type' => 'service')))), $container);
167167
}
168168

169-
/**
170-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
171-
*/
172-
public function testExceptionWhenUsingDebugName()
173-
{
174-
// logger
175-
$container = new ContainerBuilder();
176-
$loader = new MonologExtension();
177-
178-
$loader->load(array(array('handlers' => array('debug' => array('type' => 'stream')))), $container);
179-
}
180-
181169
public function testSyslogHandlerWithLogopts()
182170
{
183171
$container = $this->getContainer(array(array('handlers' => array('main' => array('type' => 'syslog', 'logopts' => LOG_CONS)))));

0 commit comments

Comments
 (0)