Skip to content

Commit b92adf6

Browse files
authored
Update event_dispatcher.rst
Update code example to match 5.1 PHP configuration format.
1 parent c2bcbf6 commit b92adf6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

event_dispatcher.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ using a special "tag":
101101
102102
// config/services.php
103103
use App\EventListener\ExceptionListener;
104+
105+
$services = $containerConfigurator->services();
104106
105-
$container->register(ExceptionListener::class)
107+
$services->set(ExceptionListener::class)
106108
->addTag('kernel.event_listener', ['event' => 'kernel.exception'])
107109
;
108110

0 commit comments

Comments
 (0)