phptools-docs
phptools-docs copied to clipboard
Autocomplete in string keeps suggesting variable that no longer exists after editing code
I started with this code:
<?php
$pimpumpapam = 123;
and I wanted to use the variable in a string, so I started typing:
and as you can see I get the suggestion as expected.
Then I edited the code and changed the name of the variable, then I deleted the variable from within the string and started re-typing it:
As you can see, it keeps suggesting the variable that no longer exist, and it does not suggest the variable name that now does exist.
In this example while taking screenshots I forgot to put something like an echo before the string to make the code make sense, but that's irrelevant, I have observed the issue with sensible code.
It seems that the autocomplete suggestions for stuff inside the string don't update when the code outside the string changes, unless you delete and rewrite the entire string.
This is not quite the same as https://github.com/DEVSENSE/phptools-docs/issues/892#issuecomment-3109352316 but I guess it might be related.