1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 10:38:49 +01:00

add cli command to turn off xdebug turnoff functionality, fix bug with docblock

This commit is contained in:
Andrew Nagy 2023-01-26 09:12:43 +00:00
parent 27c0caf2fb
commit 468e7e7d45
2 changed files with 13 additions and 2 deletions

View File

@ -90,6 +90,7 @@ final class LanguageServer
'enable-provide-signature-help::', 'enable-provide-signature-help::',
'enable-provide-definition::', 'enable-provide-definition::',
'show-diagnostic-warnings::', 'show-diagnostic-warnings::',
'disable-xdebug::',
'on-change-debounce-ms::', 'on-change-debounce-ms::',
'use-extended-diagnostic-codes', 'use-extended-diagnostic-codes',
'verbose', 'verbose',
@ -222,6 +223,9 @@ final class LanguageServer
--on-change-debounce-ms=[INT] --on-change-debounce-ms=[INT]
The number of milliseconds to debounce onChange events. The number of milliseconds to debounce onChange events.
--disable-xdebug[=BOOL]
Disable xdebug for performance reasons. Enable for debugging
--verbose --verbose
Will send log messages to the client with information. Will send log messages to the client with information.
@ -275,8 +279,14 @@ final class LanguageServer
$ini_handler->disableExtension('grpc'); $ini_handler->disableExtension('grpc');
// If Xdebug is enabled, restart without it $diableXdebug = !isset($options['disable-xdebug'])
$ini_handler->check(); || !is_string($options['disable-xdebug'])
|| strtolower($options['disable-xdebug']) !== 'false';
// If Xdebug is enabled, restart without it based on cli
if ($diableXdebug) {
$ini_handler->check();
}
setlocale(LC_CTYPE, 'C'); setlocale(LC_CTYPE, 'C');

View File

@ -109,6 +109,7 @@ class TextDocument
/** /**
* The document change notification is sent from the client to the server to signal changes to a text document. * The document change notification is sent from the client to the server to signal changes to a text document.
* *
* @param VersionedTextDocumentIdentifier $textDocument
* @param TextDocumentContentChangeEvent[] $contentChanges * @param TextDocumentContentChangeEvent[] $contentChanges
*/ */
public function didChange(VersionedTextDocumentIdentifier $textDocument, array $contentChanges): void public function didChange(VersionedTextDocumentIdentifier $textDocument, array $contentChanges): void