You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find indirect references, sharing same interface #809
I was looking at #698 and started wondering if one option would have been to use find-references with some extra metadata (leaving the client doing the filtering to solve #698), but then realised this would not going to work because find-references would not have the desired reference.
using phpactor's find-references on find on this line $object = $this->repo->find(1); will only suggest the definition from the Interface, not the one in the concrete SomeDoctrineRepository.
Maybe that's a good thing but maybe having a way to also get this indirect reference in the same search would be useful ?
(i.e. member search without specifying the member) will currently find all the members of Phpactor\\Application in theory. But it is slow
as we have to parse all the files in the project - if we pass the member name
we can at least pre-filter. I guess it could possibly be optimized further
though.
I've tried the cli and could reproduce my issue using fs composer like this (I can't paste the real example)
phpactor references:member "\RandomService""find" --filesystem=composer
src/SomeRepository.php xx public functionfind(int$id): Object;
src/RandomService.php yy $object = $this->repo->find(1);
but using fs simple or git would fail on ClassToFileSourceLocator : Could not locate a candidate for someclass
But anyway, when I run phpactor status, the detected filesystems are simple and composer, not git (probably because the project root from phpactor's perspective is a subfolder of the main project (which is using git))
Activity
dantleech commentedon Aug 23, 2019
(i.e. member search without specifying the member) will currently find all the members of
Phpactor\\Applicationin theory. But it is slowas we have to parse all the files in the project - if we pass the member name
we can at least pre-filter. I guess it could possibly be optimized further
though.
kermorgant commentedon Aug 24, 2019
I've tried the cli and could reproduce my issue using fs composer like this (I can't paste the real example)
but using fs simple or git would fail on ClassToFileSourceLocator :
Could not locate a candidate for someclassBut anyway, when I run
phpactor status, the detected filesystems are simple and composer, not git (probably because the project root from phpactor's perspective is a subfolder of the main project (which is using git))Ensure workspace is indexed when finding references
Ensure workspace is indexed when finding references
Ensure workspace is indexed when finding references (#1237)