@@ -153,6 +153,7 @@ with the ``doctrine.event_listener`` tag:
153153
154154 .. code-block :: yaml
155155
156+ # config/services.yaml
156157 services :
157158 # ...
158159
@@ -172,6 +173,7 @@ with the ``doctrine.event_listener`` tag:
172173
173174 .. code-block :: xml
174175
176+ <!-- config/services.xml -->
175177 <?xml version =" 1.0" ?>
176178 <container xmlns =" http://symfony.com/schema/dic/services"
177179 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine" >
@@ -195,6 +197,7 @@ with the ``doctrine.event_listener`` tag:
195197
196198 .. code-block :: php
197199
200+ // config/services.php
198201 use App\EventListener\SearchIndexer;
199202
200203 // listeners are applied by default to all Doctrine connections
@@ -250,6 +253,7 @@ with the ``doctrine.orm.entity_listener`` tag:
250253
251254 .. code-block :: yaml
252255
256+ # config/services.yaml
253257 services :
254258 # ...
255259
@@ -274,6 +278,7 @@ with the ``doctrine.orm.entity_listener`` tag:
274278
275279 .. code-block :: xml
276280
281+ <!-- config/services.xml -->
277282 <?xml version =" 1.0" ?>
278283 <container xmlns =" http://symfony.com/schema/dic/services"
279284 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine" >
@@ -302,6 +307,7 @@ with the ``doctrine.orm.entity_listener`` tag:
302307
303308 .. code-block :: php
304309
310+ // config/services.php
305311 use App\Entity\User;
306312 use App\EventListener\UserChangedNotifier;
307313
@@ -394,6 +400,7 @@ with the ``doctrine.event_subscriber`` tag:
394400
395401 .. code-block :: yaml
396402
403+ # config/services.yaml
397404 services :
398405 # ...
399406
@@ -403,6 +410,7 @@ with the ``doctrine.event_subscriber`` tag:
403410
404411 .. code-block :: xml
405412
413+ <!-- config/services.xml -->
406414 <?xml version =" 1.0" ?>
407415 <container xmlns =" http://symfony.com/schema/dic/services"
408416 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine" >
@@ -417,6 +425,7 @@ with the ``doctrine.event_subscriber`` tag:
417425
418426 .. code-block :: php
419427
428+ // config/services.php
420429 use App\EventListener\DatabaseActivitySubscriber;
421430
422431 $container->autowire(DatabaseActivitySubscriber::class)
@@ -430,6 +439,7 @@ can do it in the service configuration:
430439
431440 .. code-block :: yaml
432441
442+ # config/services.yaml
433443 services :
434444 # ...
435445
@@ -439,6 +449,7 @@ can do it in the service configuration:
439449
440450 .. code-block :: xml
441451
452+ <!-- config/services.xml -->
442453 <?xml version =" 1.0" ?>
443454 <container xmlns =" http://symfony.com/schema/dic/services"
444455 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine" >
@@ -453,6 +464,7 @@ can do it in the service configuration:
453464
454465 .. code-block :: php
455466
467+ // config/services.php
456468 use App\EventListener\DatabaseActivitySubscriber;
457469
458470 $container->autowire(DatabaseActivitySubscriber::class)
0 commit comments