From 82c5547931d5fa2b582fa4526890f242a1ca2697 Mon Sep 17 00:00:00 2001 From: Nick DeCoursin Date: Wed, 26 Nov 2014 19:29:58 -0500 Subject: [PATCH] Correction Events.rs - Entity Listeners Resolver Configuring the Entity Listener Resolver can only be done before Entity Manager is initialized as described here: https://github.com/doctrine/doctrine2/pull/1193 --- docs/en/reference/events.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index 0990315ec..1a1728392 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -942,8 +942,9 @@ Implementing your own resolver : } } - // configure the listener resolver. - $em->getConfiguration()->setEntityListenerResolver($container->get('my_resolver')); + // Configure the listener resolver only before instantiating the EntityManager + $configurations->setEntityListenerResolver(new MyEntityListenerResolver); + EntityManager::create(.., $configurations, ..); Load ClassMetadata Event ------------------------