Skip to content
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

Autocomplete no longer working on PHPStorm 2018.3 #1266

Closed
rrajkomar opened this issue Dec 3, 2018 · 12 comments
Closed

Autocomplete no longer working on PHPStorm 2018.3 #1266

rrajkomar opened this issue Dec 3, 2018 · 12 comments

Comments

@rrajkomar
Copy link

rrajkomar commented Dec 3, 2018

Hi,
Since the latest release of PHPStorm it seems the autocomplete for repository methods, entity manager methods seems to no longer be working.
Here are my configuration information :

PhpStorm 2018.3
Build #PS-183.4284.150, built on November 21, 2018
JRE: 1.8.0_152-release-1343-b15 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-8-amd64

Plugin version : v0.17.169

Symfony 3.4

@alturic
Copy link

alturic commented Dec 5, 2018

Are you referring to Twig template? If so, yes I'm having the same issue. If not, all of my auto-completion is working except for Twig entity properties...

PhpStorm 2018.3
Symfony 4.2

@bcastagna
Copy link

bcastagna commented Dec 9, 2018

Uninstalling and re-installing the plugin from the market worked for me. Go figure...
EDIT:
I add that when I import settings downloaded from themes-color, my symfony plugin stops working, I uninstall and reinstall it again, and it works... but my settings 'solarized-light-alternate.jar" are not imported properly. Seems like a conflict between custom settings .jar and plugin ? This sounds weird.

@rrajkomar
Copy link
Author

rrajkomar commented Dec 10, 2018

@alturic : no I meant autocompletion for methods like em->getRepository(...)->getSomeMethod()
Also from a controller a $this->get(...) does not seem to be recognized

@bcastagna : tried uninstalling/reinstalling did not change a thing :-(

@rrajkomar
Copy link
Author

rrajkomar commented Jan 18, 2019

I saw a new version of the plugin was released but the issue seems to still be there

@rrajkomar
Copy link
Author

Ok foudn why it wasn't working for me : when you have multiple vendors directories in the same project and the same classes are present in several of those, PHPStorm can't properly provide the necessary data for the autocompelte to work.

I had to exclude all but one of my vendors directories (didn't like it though) in order for it to work again.

@er1z
Copy link

er1z commented Jan 23, 2019

What is the point of having more than single vendor? Just curious. :D

@rrajkomar
Copy link
Author

Hi, not my choice.
But the answer is monolithic repository with several closely related (yet distinct) application projects (each with a specific vendor dir)

@er1z
Copy link

er1z commented Jan 23, 2019

If each sub-project is in another directory, just open it within anothe PHPStorm project.

@Jeordy
Copy link

Jeordy commented Mar 13, 2019

Same problem here. EntityManager autocomplete does work in Symfony 4 projects, but not in 3.4 anymore. Reinstalled the plugin, did a reindex, removed .idea folder and recreated the project, updated composer, etc. Nothing seems to work. Any help is really appreciated.

@theedov
Copy link

theedov commented Feb 1, 2020

Same here. Symfony5 & newest plugin version & newest phpstorm version. Autocomplete is not working at all, if I do for example $this-> in controller
I see only this:
image
image

@mortolian
Copy link

mortolian commented Mar 8, 2020

I started a new Symfony 5 project with PhpStorm 2019.3 and Symfony Support Plugin 0.19.189. Autocomplete did not work properly and namespaces did not resolve.

What fixed the problem for me was to right-click on the project name and then select 'Inspect Code'.

Screenshot 2020-03-08 at 10 27 51

And voilà!

Screenshot 2020-03-08 at 10 29 04

What is also worth mentioning is that the problem started after an upgrade of PhpStorm, so that is something worth pondering.

Things I tried that did not work:

  • Removing the Symfony Support and associated plugins and re-installing them,
  • Restarting in all kinds of different ways,
  • Removing the project and recreating it from scratch,
  • Composer dump-autoload

@NTsvetkov
Copy link

NTsvetkov commented Sep 18, 2021

If anyone has missed the solution, here it is:
https://github.com/Haehnchen/idea-php-symfony2-plugin#user-content-autocomplete-or-something-else-is-not-working-help-open_mouth

You must explicitly enable the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants