File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,17 @@ using a special "tag":
100100 .. code-block :: php
101101
102102 // config/services.php
103+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
104+
103105 use App\EventListener\ExceptionListener;
104-
105- $services = $containerConfigurator->services();
106106
107- $services->set(ExceptionListener::class)
108- ->addTag('kernel.event_listener', ['event' => 'kernel.exception'])
109- ;
107+ return function(ContainerConfigurator $configurator) {
108+ $services = $configurator->services();
109+
110+ $services->set(ExceptionListener::class)
111+ ->addTag('kernel.event_listener', ['event' => 'kernel.exception'])
112+ ;
113+ };
110114
111115 Symfony follows this logic to decide which method to call inside the event
112116listener class:
You can’t perform that action at this time.
0 commit comments