question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function not found when using GetRepository

See original GitHub issue

$objDocuments = $this->get('doctrine')->getRepository('AppBundle:Docs')->findAllDisplayable();

public function findAllDisplayable() exists in DocsRepository, and the code works just fine, but PHPStorm/Symfony plugin flags Method ‘findAllDisplayable’ not found in \Doctrine\Common\Persistence\ObjectRepository

Note that Docs Entity does contain @ORM\Entity(repositoryClass=“AppBundle\Entity\DocsRepository”)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ktwbccommented, Oct 20, 2016

@cmodijk you could hint it for PHPStorm by doing something like this until the plugin addresses it

        /** @var RegistryInterface $doctrine */
        $doctrine = $this->getContainer()->get('doctrine');
        $doctrine->getRepository('AppBundle:Users')->getActiveUsers();
0reactions
Koccommented, Nov 2, 2016

Similar to #287

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symfony 3.4 : Repository method not found - Stack Overflow
Check first that you don't get a null object when using $this->getDoctrine()->getRepository('techeventBundle:Panier'); · $panier = $this-> ...
Read more >
Find Options - typeorm - GitBook
All repository and manager .find* methods accept special options you can use to query data you need without using QueryBuilder :.
Read more >
TypeORM - Working with Repository - Tutorialspoint
Repository is specific to an entity. In other words, each entity will have its own, build-in repository and it can be accessed using...
Read more >
get-repository-endpoint — AWS CLI 1.27.27 Command ...
Override command's default URL with the given URL. --no-verify-ssl (boolean). By default, the AWS CLI uses SSL when communicating with AWS services. For ......
Read more >
typeorm/typeorm - Gitter
on a postgres db, yet I can still save an entity with a value that is not part of ... property 'getRepository' of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found