symfony/symfony — Issue #3019: doctrine:generate:entities when entity is in subfolder
Author: tixz
Created: 2012-01-03 06:36:10+00:00
State: open

I have an enitity folder that looks similar to this:

```
Entity/
Subject.php
Performance/
Paper.php
```

The subject has an association like this:

```
/**
* @ORM\OneToMany(targetEntity="Performance/Paper", mappedBy="subject")
*/
private $papers;
```

Likewise on the paper side:

```
/**
* @ORM\ManyToOne(targetEntity="Subject", inversedBy="papers")
*/
private $subject;
```

When running doctrine:generate:entities it will generate a function like this:

```
/**
* Add papers
*
* @param Acme\PaperBundle\Entity\Performance/Paper $papers
*/
public function addPerformance/PaperOne(\Tixz\IB\QuizBundle\Entity\Performance/PaperOne $papers)
{
$this->papers[] = $papers;
}
```

Where the function name contains an illegal character and the last slashes should have been backslashes.

I hope this bug report has enough information to replicate the bug.