Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Server/TextDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public function xdefinition(TextDocumentIdentifier $textDocument, Position $posi
if (preg_match('/\/vendor\/([^\/]+\/[^\/]+)\//', $def->symbolInformation->location->uri, $matches) && $this->composerLock !== null) {
// Definition is inside a dependency
$packageName = $matches[1];
foreach ($this->composerLock->packages as $package) {
foreach (array_merge($this->composerLock->packages, $this->composerLock->{'packages-dev'}) as $package) {
if ($package->name === $packageName) {
$symbol->package = $package;
break;
Expand Down
4 changes: 2 additions & 2 deletions src/Server/Workspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function xreferences($query, array $files = null): Promise
// Find out package name
preg_match('/\/vendor\/([^\/]+\/[^\/]+)\//', $def->symbolInformation->location->uri, $matches);
$packageName = $matches[1];
foreach ($this->composerLock->packages as $package) {
foreach (array_merge($this->composerLock->packages, $this->composerLock->{'packages-dev'}) as $package) {
if ($package->name === $packageName) {
$symbol->package = $package;
break;
Expand Down Expand Up @@ -165,7 +165,7 @@ public function xdependencies(): array
return [];
}
$dependencyReferences = [];
foreach ($this->composerLock->packages as $package) {
foreach (array_merge($this->composerLock->packages, $this->composerLock->{'packages-dev'}) as $package) {
$dependencyReferences[] = new DependencyReference($package);
}
return $dependencyReferences;
Expand Down