From 8f5d5e35d04986098c52b3213886cd1a1de58639 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Thu, 22 Jun 2017 19:21:14 +0200 Subject: [PATCH] Ignore ReferenceInformation->symbol --- src/Server/Workspace.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/Server/Workspace.php b/src/Server/Workspace.php index 07481ce..f8e5a95 100644 --- a/src/Server/Workspace.php +++ b/src/Server/Workspace.php @@ -148,32 +148,11 @@ class Workspace $refInfos = []; foreach ($refs as $uri => $fqns) { foreach ($fqns as $fqn) { - $def = $this->dependenciesIndex->getDefinition($fqn); - if ($def === null) { - $this->client->window->logMessage(MessageType::WARNING, "Reference $fqn not found in index"); - continue; - } - // Find out package name - $packageName = getPackageName($def->symbolInformation->location->uri, $this->composerJson); - $symbol = new SymbolDescriptor($fqn, new PackageDescriptor($packageName)); - // If there was no FQSEN provided, check if query attributes match - if (!isset($query->fqsen)) { - $matches = true; - foreach (get_object_vars($query) as $prop => $val) { - if ($query->$prop != $symbol->$prop) { - $matches = false; - break; - } - } - if (!$matches) { - continue; - } - } $doc = yield $this->documentLoader->getOrLoad($uri); foreach ($doc->getReferenceNodesByFqn($fqn) as $node) { $refInfo = new ReferenceInformation; $refInfo->reference = Location::fromNode($node); - $refInfo->symbol = $symbol; + $refInfo->symbol = $query; $refInfos[] = $refInfo; } }