-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony 5 Support #1401
Comments
I have same problem, but it occurred not after upgrade to Symfony 5, but doctrine/persistence 1.3, which included deprecation of Doctrine\Common\Persistence* namespaces in favor of Doctrine\Persistence*. I believe this change could've broken completions for everything Doctrine related. Hope this info helps a bit. |
Right, since upgrading DoctrineBundle 2 with the persistence library, it has stopped getting autocompletion on the controller. |
@Lustmored thanks for you feedback: For Doctrine interface changes: #1404 @doriangrelu What do you mean by "Bad template completion"? |
Support shortcuts instances of "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" #1401
hopefully i catched all methods, looks now much better via |
Hello @Haehnchen , I just updated the plugin and cleaned the cache of both PHPStorm editor and Symfony plugin using the TestController.php example: $em = $this->getDoctrine()->getManager();
$repository = $em->getRepository(Entity::class)->Not autocompleted->customRepositoryMethod(); $query = $em->getRepository(Entity::class)->createQueryBuilder('e')->Not autocompleted->leftJoin(); |
If I use |
I have many repositories that act as a service and therefore extends Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository, which in fact extends Doctrine\ORM\EntityRepository, that implements Doctrine\Common\Persistence\ObjectRepository which is an alias for \Doctrine\Persistence\ObjectRepository. Long story short - two easily recognisable problems:
My reasoning is that maybe class aliases are somewhere not correctly recognized, so in mentioned ObjectRepositoryResultTypeProvider there should be. I will follow with pull request trying to match all "legacy" namespaces with their new couterpart. I've tried to set up everything for plugin development, but failed so far, so I only know my version builds and Gradle "verifyPlugin" script runs OK. |
I see there is a new version with PR merged in. After clearing indexes and running inspection throughout my rather large project there is just one or two type compatibility issues instead of hundreds that were before. Also code completion for repositories works as intended. So at least all problems I have encountered seems fixed. |
I don't currently have an autocomplete with Doctrine. |
Same for me with Symfony 3.4, Doctrine getRepository are no longer working with PHPStorm 2020 |
issues for 2020.x are also reflect in fail tests. #1453 |
Bad template completion in controller and missing completion for repositories.
The text was updated successfully, but these errors were encountered: