use classname as classalias not recognized by intellisense
6 posts
• Page 1 of 1
use classname as classalias not recognized by intellisense
Hi,
a simple example where use namespace as alias is declared the alias is then not recognized.
with this the used ClassAlias at extends is underlined green and declared as "Use of unknown class".
a simple example where use namespace as alias is declared the alias is then not recognized.
- Code: Select all
namespace some\name\space;
use some\other\name\space\Class as ClassAlias;
class Class extends ClassAlias
{
}
with this the used ClassAlias at extends is underlined green and declared as "Use of unknown class".
- urosg
- Posts: 51
- Joined: February 24th, 2016, 2:05 am
Re: use classname as classalias not recognized by intellisen
Hi,
Thanks for the post.
The warning seems to be fine. It doesn't say `ClassAlias` is unknown, it says `some\other\name\space\Class` is unknown.
If I didn't get the issue please let me know.
Thanks
Thanks for the post.
The warning seems to be fine. It doesn't say `ClassAlias` is unknown, it says `some\other\name\space\Class` is unknown.
If I didn't get the issue please let me know.
Thanks
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: use classname as classalias not recognized by intellisen
Thank you for the answer, it seems there must have been some other error present in parsing the project as I now rechecked and the issue is not apparent anymore.
Thanks again!
Thanks again!
- urosg
- Posts: 51
- Joined: February 24th, 2016, 2:05 am
Re: use classname as classalias not recognized by intellisen
Great. I'm glad it's fine now.
Have a good one,
Have a good one,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: use classname as classalias not recognized by intellisen
This issue has risen up again, unfortunately I don't yet have a way to 100% reproduce it.
Will try to find more details and let you know.
Will try to find more details and let you know.
- urosg
- Posts: 51
- Joined: February 24th, 2016, 2:05 am
Re: use classname as classalias not recognized by intellisen
Now this is interesting.
Currently I have the solution open with two vertical windows, in the left one the classes are recognized correctly but in the right one (let's say) partially.
See here "right" side:
and "left" side:
You can see that the classes are underlined as unknown, where the "yii\helpers\Url" actually shows "unknown class error" but the "ActiveForm" (which has the "use kartik\widget\ActiveForm at start) shows the correct description along with the unknown class error. But in the "left" you can see the yii\helpers namespace be recognized correctly.
After reloading Visual Studio it was recognized ok. It seems that sometimes the project is not loaded correctly, but there were no errors while loading in both cases.
Currently I have the solution open with two vertical windows, in the left one the classes are recognized correctly but in the right one (let's say) partially.
See here "right" side:
and "left" side:
You can see that the classes are underlined as unknown, where the "yii\helpers\Url" actually shows "unknown class error" but the "ActiveForm" (which has the "use kartik\widget\ActiveForm at start) shows the correct description along with the unknown class error. But in the "left" you can see the yii\helpers namespace be recognized correctly.
After reloading Visual Studio it was recognized ok. It seems that sometimes the project is not loaded correctly, but there were no errors while loading in both cases.
You do not have the required permissions to view the files attached to this post.
- urosg
- Posts: 51
- Joined: February 24th, 2016, 2:05 am
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests