1
0
Fork 0

Include packages-dev

pull/282/head
Felix Becker 2017-02-06 11:23:11 +01:00
parent 5100d89617
commit 65a2ce2d4b
2 changed files with 3 additions and 3 deletions

View File

@ -412,7 +412,7 @@ class TextDocument
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;

View File

@ -124,7 +124,7 @@ class Workspace
// 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;
@ -165,7 +165,7 @@ class Workspace
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;