Merge branch 'master' into allow-custom-vendor-dir
commit
4cf3fefd09
|
@ -18,7 +18,7 @@ class FileSystemCache implements Cache
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
if (PHP_OS === 'WINNT') {
|
||||
if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
||||
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
|
||||
} else if (getenv('XDG_CACHE_HOME')) {
|
||||
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -125,7 +125,7 @@ class Workspace
|
|||
}
|
||||
// Find out package name
|
||||
$packageName = getPackageName($this->composerJson, $def->symbolInformation->location->uri);
|
||||
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;
|
||||
|
@ -166,7 +166,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;
|
||||
|
|
Loading…
Reference in New Issue