Generating related entity methods @param doc #5796

Closed
Sukhrob opened this Issue Oct 20, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@Sukhrob

Sukhrob commented Oct 20, 2012

I love Symfony very much. It is a great framework. But, I came across a small issue in generating code from console.

When I generate related entity methods with "php app/console doctrine:generate:entities namespace", it generates the code like below.

 /**
   * Set attributeName
   *
   * @param Example\TestBundle\Entity\AnotherTestEntity $attributeName
   * @return TestEntity
   */
   public function setAttributeName(\Example\TestEntity\Entity\AnotherTestEntity $attributeName)
   {
       $this->attributeName = $attributeName;

       return $this;
   }

Pay attention to this:
"@param Example\TestBundle\Entity\AnotherTestEntity $attributeName"

Here, there is no backward slash before "Example". Of course, this is not a big issue. But, it shows warning in IDEAs such as PHPStorm.

I am reporting this issue because I want Symfony to be as perfect as possible :).

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Oct 20, 2012

It would be better for the generate to write a use statement at the top of the file and then just @param ClassName

ghost commented Oct 20, 2012

It would be better for the generate to write a use statement at the top of the file and then just @param ClassName

@fabpot

This comment has been minimized.

Show comment Hide comment
@fabpot

fabpot Oct 20, 2012

Owner

Thanks for the report but this command is not part of Symfony, but comes from the DoctrineBundle. Can you report the issue there? Thanks.

Owner

fabpot commented Oct 20, 2012

Thanks for the report but this command is not part of Symfony, but comes from the DoctrineBundle. Can you report the issue there? Thanks.

@fabpot fabpot closed this Oct 20, 2012

@stof

This comment has been minimized.

Show comment Hide comment
@stof

stof Oct 20, 2012

Member

in fact, reporting it to the Doctrine ORM will be better than to DoctrineBundle as DoctrineBundle only call the generator shipped by the ORM (this will avoid me asking you to move the ticket again)

Member

stof commented Oct 20, 2012

in fact, reporting it to the Doctrine ORM will be better than to DoctrineBundle as DoctrineBundle only call the generator shipped by the ORM (this will avoid me asking you to move the ticket again)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment