File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -406,18 +406,13 @@ want to log all the database activity. To do so, define a subscriber for the
406406 }
407407 }
408408
409- .. note ::
410-
411- ``Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface ``
412- is a marker interface extending ``Doctrine\Common\EventSubscriber `` and was
413- introduced in DoctrineBundle 2.1.
414- Subscribers implementing this interface will be enabled automatically in the
415- Symfony application.
416- In older versions of DoctrineBundle, the service had to be added manually
417- and tagged with the ``doctrine.event_subscriber `` tag.
409+ If you're using the :ref: `default services.yaml configuration <service-container-services-load-example >`
410+ and DoctrineBundle 2.1 (released May 25, 2020) or newer, this example will already
411+ work! Otherwise, :ref: `create a service <service-container-creating-service >` for this
412+ subscriber and :doc: `tag it </service_container/tags >` with ``doctrine.event_subscriber ``.
418413
419414If you need to associate the subscriber with a specific Doctrine connection, you
420- can do it in the service configuration:
415+ must do that in the manual service configuration:
421416
422417.. configuration-block ::
423418
You can’t perform that action at this time.
0 commit comments