[DDC-2572] ResolveTargetEntityListener does not work as documented. Created: 26/Jul/13  Updated: 08/Sep/13  Resolved: 08/Aug/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Documentation, ORM, Tools
Affects Version/s: 2.3.4
Fix Version/s: 2.5
Security Level: All

Type: Bug Priority: Critical
Reporter: Scott Gibson Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: orm
Environment:

Debian x64



 Description   

Your documentation on RTEL shows this example:
https://doctrine-orm.readthedocs.org/en/latest/cookbook/resolve-target-entity-listener.html

$evm = new \Doctrine\Common\EventManager;

$rtel = new \Doctrine\ORM\Tools\ResolveTargetEntityListener;
$rtel->addResolveTargetEntity('Acme\\InvoiceModule\\Model\\InvoiceSubjectInterface', 'Acme\\CustomerModule\\Entity\\Customer', array());

// Add the ResolveTargetEntityListener
$evm->addEventSubscriber($rtel);

$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $evm);

However, ResolveTargetEntityListener does not implement EventSubscriber, so it fails.



 Comments   
Comment by Fabio B. Silva [ 08/Aug/13 ]

Fixed by : https://github.com/doctrine/doctrine2/commit/0a42401a43dfe1e5c24018bb0fb65deab338d4b5

Generated at Tue Sep 02 07:11:43 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.