php variables in Language Injection

Maybe, I'm missing something but once phpstorm decides that I am using a language injection, it doesn't seem to recognize $vars in strings.

For example, if I have the following:

function findperson($name) {
     $query = "select id from persons where name = '$name'";
     $id = getfromdb($query);
}

It doesn't seem to realize that $name is a php variable, doesn't provide completion, and doesn't provide syntax highlighting for the string.

Interestingly, as soon as I use the variable $name in the argument list does change the syntax highlighting to show that the variable is used.|

Idas?

4 comments
Comment actions Permalink

Thanks.  In the meantime, how do I turn off the language injection, because it's more important for me to have variable completion.

Also, how do I watch a bug?

0
Comment actions Permalink

To disable/enable Language Injection: File | Settings | Language Injection

To watch a ticket: register on Issue Tracker, when done -- click on Star on desired ticket. You will receive email notifications about all status updates/comments (configurable in account preferences).

0
Comment actions Permalink

Settings|Language Injection

Just vote an issue to watch.

0

Please sign in to leave a comment.