简体   繁体   中英

PHPStorm Namespace support not working for Symfony2 projects

I'm evaluating PHPStorm right now, and I've really grown fond of it. It's fast, has more or less everything perfectly implemented and the flow flows like a breeze...

The only thing bugging me (and that's a big one) is, that it doesn't seem to get the namespaces for my symfony2 project right.

See, in Netbeans, when I type use Symf[CTRL+SPACE] it show me all the Symfony namespaces, right out of the /vendors folder.

If I do the same in PHPStorm, no namesapces are shown. That means that the whole code copletion doesn't work for the vendor libraries, which is really very, very bad in terms of easy and fast programming.

Now, I'm quite sure that I'm just missing a setting somewhere, but I just can't find it.

The Question is a bit old, but if anyone stumbles across it (like me) and still nothing works, it might be because your vendor folder gets excluded from code inspection.

You have to go to "File -> Settings -> Directories" and set the vendor folder to be a resource root and not be excluded.

More info here: Jetbrains Namespaces

这不再是一个问题,有一个Symfony插件现在大部分时间都可以工作。

看起来像PhpStorm中已知问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM