Skip to content

Commit e7ce930

Browse files
committed
Reword
1 parent 4982d4f commit e7ce930

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

doctrine/events.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff 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

419414
If 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

0 commit comments

Comments
 (0)