Permalink
Browse files

bug #4119 Fix class name in ConsoleTerminateListener example (alOneh)

This PR was merged into the 2.3 branch.

Discussion
----------

Fix class name in ConsoleTerminateListener example

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

c0cc14f Fix class name in ConsoleTerminateListener example
  • Loading branch information...
weaverryan committed Aug 16, 2014
2 parents 84e6e7f + c0cc14f commit c0a0120cb59ae97abc813425a68311b458dc722e
Showing with 5 additions and 5 deletions.
  1. +5 −5 cookbook/console/logging.rst
@@ -205,11 +205,11 @@ First configure a listener for console terminate events in the service container
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="console_terminate_listener.class">Acme\DemoBundle\EventListener\ConsoleExceptionListener</parameter>
<parameter key="console_exception_listener.class">Acme\DemoBundle\EventListener\ConsoleExceptionListener</parameter>
</parameters>
<services>
<service id="kernel.listener.command_dispatch" class="%console_terminate_listener.class%">
<service id="kernel.listener.command_dispatch" class="%console_exception_listener.class%">
<argument type="service" id="logger"/>
<tag name="kernel.event_listener" event="console.terminate" />
</service>
@@ -223,11 +223,11 @@ First configure a listener for console terminate events in the service container
use Symfony\Component\DependencyInjection\Reference;
$container->setParameter(
'console_terminate_listener.class',
'console_exception_listener.class',
'Acme\DemoBundle\EventListener\ConsoleExceptionListener'
);
$definitionConsoleExceptionListener = new Definition(
'%console_terminate_listener.class%',
'%console_exception_listener.class%',
array(new Reference('logger'))
);
$definitionConsoleExceptionListener->addTag(
@@ -247,7 +247,7 @@ Then implement the actual listener::
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Psr\Log\LoggerInterface;
class ConsoleTerminateListener
class ConsoleExceptionListener
{
private $logger;

0 comments on commit c0a0120

Please sign in to comment.