-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find references does not return the usings of class or interface #1162
Comments
Doesn't return |
Because it's not really interesting. It may also increase significantly increase the size of the index. So we have these options: 1/ Increase the size of the index and expand the search criteria to specify if these symbols should be found or not. I'd consider option For |
Not sure why Option 2/ is not bad. The only thing that bothers me is that a |
|
Any indexing the use statements also means, by default, that the
|
The I think to support trait use in the references we just need to use |
I am not sure. I wrote these tests and they don't work: public function provideClasses(): Generator
{
yield 'use trait (basic)' => [
"// File: src/file1.php\n<?php class C { use T; }",
'T',
[0, 0, 1]
];
yield 'use trait (namespaced)' => [
"// File: src/file1.php\n<?php use N\T; class C { use T; }",
'N\T',
[0, 0, 2]
];
} Am I missing something? |
I agree.
|
I am inclined to agree. I can have the Renamer search the namespace use clauses wherever it finds references. |
Cool - the trait use indexer is missing a dedicated test class, but it is tested in the |
I added tests for everything. We can comment on the PR. |
You haven't made the PR yet or? |
I haven't. I need to fix my renamer first. |
If a class is searched for references, say
Class3
, this line won't be returned:use Temp2\Folder\Class3;
Since that is a reference to the class/interface/function, maybe it should be returned?
The text was updated successfully, but these errors were encountered: