insperedia / yiidea-support

Other
2 stars 0 forks source link

"Missed View variable declarations" always show #16

Closed mzdani closed 1 month ago

mzdani commented 1 month ago

Hello, nice and thanks for the plugin :thumbsup:

Btw, when a view file doesn't have required variable, there is an error bar show up. And (sometimes) when I add missed variable on to the view doc block, warning about missed view variable still there.

2024-06-24 09-49-35 GIT_Bootstrap_5 – _checkout php

even when I try to click on Add missed variable declarations, it still there with duplication with existed one.

2024-06-24 09-49-48 GIT_Bootstrap_5 – _checkout php(1)

I try to Invalidate caches and restart ide, but it still there. Like I said earlier, it's not always error like this. Even I don't know how to "always" create the problem. But it seems that plugin failed to detect already existed variable on view file.

Is it a bug or maybe there is some setting that I don't know?

Thanks :grin:

verifiera commented 1 month ago

The plug-in uses PHPStorm's built-in PHP parser to check if a view has variables. It would be nice to provide more information. The first thing you can do is to check the IDE "see" variable. You can try to see methods for $formModel by typing $formModel->, so you should see a dropdown for this object method.

mzdani commented 1 month ago

If I type $formModel-> there is autocomplete for this variable.

Screenshot at Jun 24 19-31-44

I try to disabled all external plugins and then re-enable it, restart IDE, and the warning bar is gone. I'm sorry sire as I can't provide more information about this for now.

Thank you for this awesome plugin 👍🏼 , I'll close this because lacking of information 😁