Add Symfony ErrorHandler (#58)
parent
15e004fb9b
commit
23b127a986
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
use LanguageServer\{LanguageServer, ProtocolStreamReader, ProtocolStreamWriter};
|
use LanguageServer\{LanguageServer, ProtocolStreamReader, ProtocolStreamWriter};
|
||||||
use Sabre\Event\Loop;
|
use Sabre\Event\Loop;
|
||||||
|
use Symfony\Component\Debug\ErrorHandler;
|
||||||
|
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
cli_set_process_title('PHP Language Server');
|
|
||||||
|
|
||||||
foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
|
foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
|
@ -13,6 +13,10 @@ foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../autoload.php', __DI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ErrorHandler::register();
|
||||||
|
|
||||||
|
cli_set_process_title('PHP Language Server');
|
||||||
|
|
||||||
if (count($argv) >= 3 && $argv[1] === '--tcp') {
|
if (count($argv) >= 3 && $argv[1] === '--tcp') {
|
||||||
$address = $argv[2];
|
$address = $argv[2];
|
||||||
$socket = stream_socket_client('tcp://' . $address, $errno, $errstr);
|
$socket = stream_socket_client('tcp://' . $address, $errno, $errstr);
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
"phpdocumentor/reflection-docblock": "^3.0",
|
"phpdocumentor/reflection-docblock": "^3.0",
|
||||||
"sabre/event": "^4.0",
|
"sabre/event": "^4.0",
|
||||||
"felixfbecker/advanced-json-rpc": "^1.2",
|
"felixfbecker/advanced-json-rpc": "^1.2",
|
||||||
"squizlabs/php_codesniffer" : "^2.7"
|
"squizlabs/php_codesniffer" : "^2.7",
|
||||||
|
"symfony/debug": "^3.1"
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
|
|
Loading…
Reference in New Issue