Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop DebugHandlerPass #188

Merged
merged 1 commit into from Nov 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 0 additions & 63 deletions DependencyInjection/Compiler/DebugHandlerPass.php

This file was deleted.

8 changes: 0 additions & 8 deletions DependencyInjection/Configuration.php
Expand Up @@ -231,10 +231,6 @@
* - [level]: level name or int value, defaults to DEBUG
* - [bubble]: bool, defaults to true
*
* - debug:
* - [level]: level name or int value, defaults to DEBUG
* - [bubble]: bool, defaults to true
*
* - loggly:
* - token: loggly api token
* - [level]: level name or int value, defaults to DEBUG
Expand Down Expand Up @@ -740,10 +736,6 @@ public function getConfigTreeBuilder()
->thenInvalid('The source has to be specified to use a FlowdockHandler')
->end()
->end()
->validate()
->ifTrue(function ($v) { return isset($v['debug']); })
->thenInvalid('The "debug" name cannot be used as it is reserved for the handler of the profiler')
->end()
->example(array(
'syslog' => array(
'type' => 'stream',
Expand Down
2 changes: 0 additions & 2 deletions DependencyInjection/MonologExtension.php
Expand Up @@ -657,7 +657,6 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
case 'browser_console':
case 'test':
case 'null':
case 'debug':
$definition->setArguments(array(
$handler['level'],
$handler['bubble'],
Expand Down Expand Up @@ -713,7 +712,6 @@ private function getHandlerClassByType($handlerType)
'browser_console' => 'Monolog\Handler\BrowserConsoleHandler',
'firephp' => 'Symfony\Bridge\Monolog\Handler\FirePHPHandler',
'chromephp' => 'Symfony\Bridge\Monolog\Handler\ChromePhpHandler',
'debug' => 'Symfony\Bridge\Monolog\Handler\DebugHandler',
'swift_mailer' => 'Symfony\Bridge\Monolog\Handler\SwiftMailerHandler',
'native_mailer' => 'Monolog\Handler\NativeMailerHandler',
'socket' => 'Monolog\Handler\SocketHandler',
Expand Down
4 changes: 0 additions & 4 deletions MonologBundle.php
Expand Up @@ -18,7 +18,6 @@
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass;
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass;
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddProcessorsPass;
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\FixEmptyLoggerPass;

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

$container->addCompilerPass($channelPass = new LoggerChannelPass());
if (!class_exists('Symfony\Bridge\Monolog\Processor\DebugProcessor')) {
$container->addCompilerPass(new DebugHandlerPass($channelPass));
}
$container->addCompilerPass(new FixEmptyLoggerPass($channelPass));
$container->addCompilerPass(new AddProcessorsPass());
$container->addCompilerPass(new AddSwiftMailerTransportPass());
Expand Down
12 changes: 0 additions & 12 deletions Tests/DependencyInjection/MonologExtensionTest.php
Expand Up @@ -166,18 +166,6 @@ public function testExceptionWhenUsingServiceWithoutId()
$loader->load(array(array('handlers' => array('main' => array('type' => 'service')))), $container);
}

/**
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
*/
public function testExceptionWhenUsingDebugName()
{
// logger
$container = new ContainerBuilder();
$loader = new MonologExtension();

$loader->load(array(array('handlers' => array('debug' => array('type' => 'stream')))), $container);
}

public function testSyslogHandlerWithLogopts()
{
$container = $this->getContainer(array(array('handlers' => array('main' => array('type' => 'syslog', 'logopts' => LOG_CONS)))));
Expand Down