FOSOAuthServerBundle icon indicating copy to clipboard operation
FOSOAuthServerBundle copied to clipboard

Don't get repository at construction time, it could be not loaded yet!

Open fullbl opened this issue 7 years ago • 3 comments

I ran into an issue when trying to load some repositories through compiler pass. At Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory->getRepository(), it tried to load repository of my User Entity.

I changed the TokenManager, so it doesn't try to get it too soon!

fullbl avatar Apr 26 '18 15:04 fullbl

After some more researches, I discovered that could be my installation fault. I'll leave this PR open, since it could be good to remove that call from constructor!

fullbl avatar Apr 26 '18 16:04 fullbl

👍 for me, phpstan is broken however.

GuilhemN avatar Sep 14 '18 17:09 GuilhemN

Note: this also applies to other repositories, not just EntityRepositories.

alcaeus avatar Aug 26 '19 07:08 alcaeus