DDC-2121: EntityGenerator generates bad type hint (missing \) #2669

Closed
opened 2026-01-22 13:59:47 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 4, 2012).

Jira issue originally created by user serard:

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.

Originally created by @doctrinebot on GitHub (Nov 4, 2012). Jira issue originally created by user serard: 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.
admin added the Bug label 2026-01-22 13:59:47 +01:00
admin closed this issue 2026-01-22 13:59:48 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 6, 2012):

Comment created by @FabioBatSilva:

Fixed : 262c3eea6b

@doctrinebot commented on GitHub (Nov 6, 2012): Comment created by @FabioBatSilva: Fixed : https://github.com/doctrine/doctrine2/commit/262c3eea6bd4313d34558ff434bf9b8ff34b7ab3
Author
Owner

@doctrinebot commented on GitHub (Nov 6, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 6, 2012): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2669