Skip to content

Commit ee96ffa

Browse files
Fixed the XML and PHP config instead of the YAML config
1 parent 876d572 commit ee96ffa

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

event_dispatcher.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ using a special "tag":
7777
7878
# app/config/services.yml
7979
services:
80-
app.exception_listener:
81-
class: AppBundle\EventListener\ExceptionListener:
80+
AppBundle\EventListener\ExceptionListener:
8281
tags:
8382
- { name: kernel.event_listener, event: kernel.exception }
8483
@@ -92,9 +91,7 @@ using a special "tag":
9291
http://symfony.com/schema/dic/services/services-1.0.xsd">
9392
9493
<services>
95-
<service id="app.exception_listener"
96-
class="AppBundle\EventListener\ExceptionListener">
97-
94+
<service id="AppBundle\EventListener\ExceptionListener">
9895
<tag name="kernel.event_listener" event="kernel.exception" />
9996
</service>
10097
</services>
@@ -106,7 +103,7 @@ using a special "tag":
106103
use AppBundle\EventListener\ExceptionListener;
107104
108105
$container
109-
->register('app.exception_listener', ExceptionListener::class)
106+
->autowire(ExceptionListener::class)
110107
->addTag('kernel.event_listener', array('event' => 'kernel.exception'))
111108
;
112109

0 commit comments

Comments
 (0)