Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2121

EntityGenerator generates bad type hint (missing \)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2, 2.3
    • Fix Version/s: 2.3.1
    • Component/s: Tools
    • Labels:
      None

      Description

      Having an Entity class with this property declaration :

      /**
       * @ORM\OneToMany(targetEntity="Plan", mappedBy="Dossier")
       * @var Plan[]
       **/
      protected $Plans;
      

      Getter & Setter are generated this way :

      /**
       * Add Plans
       *
       * @param se\JpsBundle\Entity\Plan $plans
       * @return Dossier
       */
      public function addPlan(\se\JpsBundle\Entity\Plan $plans)
      {
        $this->Plans[] = $plans;
        return $this;
      }
      

      Problem lies in the

      @param se\JpsBundle\Entity\Plan $plans
      

      Should be :

      \se\JpsBundle\Entity\Plan $plans
      

      Same thing for Doctrine Collection class.

        Activity

        Show
        Fabio B. Silva added a comment - Fixed : https://github.com/doctrine/doctrine2/commit/262c3eea6bd4313d34558ff434bf9b8ff34b7ab3

          People

          • Assignee:
            Fabio B. Silva
            Reporter:
            Stéphane Erard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: