FOSOAuthServerBundle
FOSOAuthServerBundle copied to clipboard
Don't get repository at construction time, it could be not loaded yet!
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!
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!
👍 for me, phpstan is broken however.
Note: this also applies to other repositories, not just EntityRepositories.