mirror of
https://github.com/danog/psalm.git
synced 2024-12-11 08:49:52 +01:00
dont allow clients to destroy our local configurations
This commit is contained in:
parent
b3cc5c7f67
commit
6855c2307d
@ -85,10 +85,9 @@ class LanguageClient
|
||||
if ($error) {
|
||||
$this->server->logError('There was an error getting configuration');
|
||||
} else {
|
||||
/** @var array<int, array> $value */
|
||||
/** @var array<int, object> $value */
|
||||
[$config] = $value;
|
||||
$this->mapper->map($config, $this->clientConfiguration);
|
||||
$this->configurationRefreshed();
|
||||
$this->configurationRefreshed((array) $config);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -153,10 +152,19 @@ class LanguageClient
|
||||
);
|
||||
}
|
||||
|
||||
private function configurationRefreshed(): void
|
||||
/**
|
||||
* Configuration Refreshed from Client
|
||||
*
|
||||
* @param array $config
|
||||
*/
|
||||
private function configurationRefreshed(array $config): void
|
||||
{
|
||||
//do things when the config is refreshed
|
||||
|
||||
if (empty($config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_null($this->clientConfiguration->provideCompletion)) {
|
||||
//$this->server->project_analyzer->provide_completion = $this->clientConfiguration->provideCompletion;
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ class LanguageServer extends Dispatcher
|
||||
return;
|
||||
}
|
||||
|
||||
if ($type < $logLevel) {
|
||||
if ($type > $logLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user