Hi there,

I do not understand the issue here -- class name should be completed in the same way as any other namespaced class -- you just start typing and IDE shows you all possible variants that it knows about.

1) Maybe it does not know about your Yii2 code (in other words -- check if such file is part of your project or referenced somehow) ?

2) Try "File | Invalidate Caches..." and restart IDE in case if file is there but IDE doe snot see it.

0

I don't understand it either. I've tried invalidating the cache and restarting. Same issue.
It finds some classes, but quite a few are not found for some reasons.

See the screenshot below:
2015-04-02_10-38-15.png

Here's the file directory:
2015-04-02_10-41-56.png

Not sure what's going on.

0

Where do you try to complete it?

If it's the place shown on screenshot .. then IDE is correct here -- that class has no static methods/constants so it makes no sense to use it there in such way.

If I do "throw new \yii\web\b" then it completes just fine

P.S.
The only case where IDE should list all possible cases is to support completion of "::class" -- https://youtrack.jetbrains.com/issue/WI-20711 which is currently "In Progress"

0

Tried in a Controller class within the `controllers/` directory.
I just tried with the `throw new \yii\web\B` thing and it works now.

It wasn't working before. Maybe the `Invalidate Cache/Restart` fixed it.

Thanks.

0

请先登录再写评论。