1
votes

That the namespace of some of my bundles in Symfony 3 is not recognized in PhpStorm.

It affects:

  • my own bundles and
  • external bundles (in the vendor-folder), such as the FOM-Rest-Bundle

(see also the attached screenshot)

What I already tried:

  • Reinstalling the Symfony-Plugin (Now it is installed, but the problem still exists)

  • Change directories in Preferences > Languages & Frameworks > Symfony

  • Under Preferences > Project: MyProject I marked the folders (for example the vendor folder) as 'Source' or 'Resource Root'

  • Of course, after changing the settings I restarted PhpStorm.

Can anybody help me?

Class AppKernal

2
Which version are you using? I encountered the same problem with the Public Preview. In that case you should file a bug report. - Stephan Vierkant
PhpStorm 10.0.4 and Symfony 3.2 - codiga

2 Answers

2
votes

Well... Some problems are solved by themselves. After googling a while to get this solved and posting the question here, I though:

Let's just get started!! So I started coding.

After another while the reindex started. And - oh wonder - after that the namespaces were found! What a hustle for nothing.

I just found out that apparently you can restart the index manually in PhpStorm, so in case that anyone steps on this problem, just do:

File > Invalidate Caches...
0
votes

I had the same issue and if

File > Invalidate Caches...

doesn't solve your issue, try to disable .ignore plug-in.

As you can see on this link from jetbrains issues form, this plugin is old and is known to cause bugs with navigation and indexing.