From 568caa6237fe6b88497503e5f58a5435ad6c3817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Wagner?= Date: Tue, 22 Jan 2019 13:54:55 +0100 Subject: [PATCH] Update examples in entity listeners documentation The code example is weirdly misleading because the same class is attached to the `preUpdate` event twice. Furthermore, the YAML example is wrong and inconsistent with the XML example. This PR fixes that. --- Resources/doc/entity-listeners.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Resources/doc/entity-listeners.rst b/Resources/doc/entity-listeners.rst index 2cb325312..d47523822 100644 --- a/Resources/doc/entity-listeners.rst +++ b/Resources/doc/entity-listeners.rst @@ -14,7 +14,10 @@ entity manager it should be registered with. Example: user_listener: class: \UserListener tags: - - { name: doctrine.orm.entity_listener } + - + name: doctrine.orm.entity_listener + event: postPersist + entity: App\Entity\User - name: doctrine.orm.entity_listener event: preUpdate @@ -29,7 +32,11 @@ entity manager it should be registered with. Example: - +