PhpDocTagReference should not be referenced to the variables
See original GitHub issueAs result of fixing #59 PhpDocTagReference now is referenced to all PhpNamedElement offsprings which can lead to some problems (e.g. https://youtrack.jetbrains.com/issue/WI-39293, there @var is referenced to the $var), since Variable is PhpNamedElement as well.
While collecting the occurrences of the variables in introduce variable refactoring we are taking into account PsiReference::isReferenceTo, so @var is counted as reference to the variable $var. I think the easiest solution will be to change instanceof check at this line to something less general like (element instanceof PhpClass || element instanceof PhpNamespace), but I’m not deep into this code so please verify my proposal before implementing.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Fails to recognize import useful for PHPDoc Annotation(s ...
However PHPStorm don't check an import with alias but only if alias ... PhpDocTagReference should not be referenced to the variables #126.
Read more >Why does passing a variable by reference not work when ...
Note: If the function has arguments that need to be references, then they must be references in the passed argument list. So, your...
Read more >Nerdery General PHP Standards
Variable names MUST start with a lowercase letter and follow the camelCase naming convention. Variable names SHOULD only contain alphanumeric characters.
Read more >Sublime text by John Doe - Issuu
You can tell Sublime not to show selected folders or file types in the side bar. This is convenient for hiding files that...
Read more >Expert PHP 5 Tools
If you do not already have PHP installed on your system, you can ... Please consult the phpDoc tag reference section in this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have created a patch and added a test so that renaming the variable wouldn’t rename the DocTag.
I’ll upload a new release as soon as time allows. There’s a few things to be done upfront, but it should be up next week.