Idea-php-symfony2-plugin: Missing doctrine features in plugin

Created on 24 Jul 2019  路  1Comment  路  Source: Haehnchen/idea-php-symfony2-plugin

Hi.

Thanks for this awesome plugin! Makes refactoring so much easier.

Hopefully I am using it wrong, but when I try to "find usages" of Entity麓s property, then I don麓t get results for ones used by \Doctrine\ORM\EntityRepository->findBy or \Doctrine\ORM\EntityRepository->findOneBy. Yet go to declaration works :)

doctrine_example_1

Similar issues are with querybuilder:

  • values inside select function can go to declaration and are autocompletable, but are not found by "find usages" (only for alias that is within from);
    doctrine_example_2
  • values inside condition parameter for join function aren't findable, no autocomplete offered and can't use "go to declaration" functionality;
    doctrine_example_3
  • values inside where function are autocompletable (only for entity which is used in from function), but aren't findable and can't use "go to declaration" functionality.
    doctrine_example_4
    doctrine_example_5

PS: It doesn't matter if property is private or public.

Most helpful comment

A related issue is PHPStorm inspection can't find custom methods in Entity Repository.

        /* @var Node $node */
        $node = $em->getRepository('App:Node')->getCustomQueryFromRepository($id);

PHPStorm is searching the underlying Doctrine Repository class, not the user-contributed Entity Repository. PHPStorm and the Symfony Bundle aren't seeing the reference to the entity repository in the annotation in the Entity:

*
* @ORM\Entity(repositoryClass="App\Repository\NodeRepository")
*

Thanks!

>All comments

A related issue is PHPStorm inspection can't find custom methods in Entity Repository.

        /* @var Node $node */
        $node = $em->getRepository('App:Node')->getCustomQueryFromRepository($id);

PHPStorm is searching the underlying Doctrine Repository class, not the user-contributed Entity Repository. PHPStorm and the Symfony Bundle aren't seeing the reference to the entity repository in the annotation in the Entity:

*
* @ORM\Entity(repositoryClass="App\Repository\NodeRepository")
*

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexsakhnov picture alexsakhnov  路  7Comments

Anubarak picture Anubarak  路  5Comments

stephanvierkant picture stephanvierkant  路  3Comments

ostrolucky picture ostrolucky  路  4Comments

dewos picture dewos  路  5Comments