Skip to content

[Console] doctrine:generate:entities when entity is in subfolder #3019

@emilbayes

Description

@emilbayes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions