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