Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-830

Missing prefix \ to switch to global space in Tools/EntityGenerator

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA4
    • Fix Version/s: 2.0-RC1
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      Description

      If generated entity isn't in global namespace and extends class, name of extended class has to have prefix \ to switch to global namespace.

      Fix: class Doctrine\ORM\Tools\EntityGenerator

      Doctrine/ORM/Tools/EntityGenerator.php
      private function _getClassToExtendName()
      {
          $refl = new \ReflectionClass($this->_getClassToExtend());
      
          return '\\' . $refl->getName();
      }
      

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed.

        Show
        Benjamin Eberlei added a comment - Fixed.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Martin Hasoň
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: