idea-php-annotation-plugin icon indicating copy to clipboard operation
idea-php-annotation-plugin copied to clipboard

Setting Doctrine Repository path manual

Open dknx01 opened this issue 10 years ago • 3 comments

Maybe as an improvement:

I've my doctrine repositories under a special folder, it would be nice to configure this plugin with a custom path while generate a repository that doesn't exists yet. At the moment the repository class will be generated in the same folder.

Example: ../Entity/FooEntity.php ../Repository/FooRepository.php

Greetings Erik

dknx01 avatar Sep 23 '15 12:09 dknx01

@dknx01 what config would you expect here?

  • relative path of entity?
  • parent symfony bundle context?
  • ...

Haehnchen avatar Oct 10 '15 15:10 Haehnchen

I think relative path would be good. Default in the same folder, if configured than realtive from current folder.

dknx01 avatar Oct 11 '15 12:10 dknx01

At this moment I prefer this:

namespace Foo\Entity;
...
use Foo\Repository\ProductRepository;

/**
 * @Entity(repositoryClass=ProductRepository::class)
*/
class Product
{

}

this works fine (I could even click on repositoryClass=... class name and jump to repository class). However autocomplete in annotation and find usages for repository class (as well as refactoring) doesn't work

sirian avatar Dec 03 '16 13:12 sirian