Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2572

ResolveTargetEntityListener does not work as documented.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.5
    • Component/s: Documentation, ORM, Tools
    • Security Level: All
    • Labels:
    • 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.

        Activity

        Show
        Fabio B. Silva added a comment - Fixed by : https://github.com/doctrine/doctrine2/commit/0a42401a43dfe1e5c24018bb0fb65deab338d4b5

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Scott Gibson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: