You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for an alternative to felixfbecker/php-language-server in VSCode, since it seems a bit abandoned (latest commit was 12 Dec 2018).
I've found phpactor/vscode-phpactor extension and tried it, but it won't even start.
I've patched the extension to let the server start (Windows path were not taken into account to let the server start...), and I've found that it crashes immediately on my Win10-x64.
First error:
PHP Warning: Use of undefined constant SIGINT - assumed 'SIGINT' (this will throw an Error in a future version of PHP) in C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php on line 101
Warning: Use of undefined constant SIGINT - assumed 'SIGINT' (this will throw an Error in a future version of PHP) in C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php on line 101
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Amp\Loop::onSignal() must be of the type int, string given, called in C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php on line 104 and defined in C:\src\phpactor\vendor\amphp\amp\lib\Loop.php:241
Stack trace:
#0 C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php(104): Amp\Loop::onSignal('SIGINT', Object(Closure))
#1 C:\src\phpactor\vendor\phpactor\language-server-extension\lib\LanguageServer\Command\StartCommand.php(59): Phpactor\LanguageServer\Core\Server\LanguageServer->run()
#2 C:\src\phpactor\vendor\symfony\console\Command\Command.php(299): Phpactor\Extension\LanguageServer\Command\StartCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 C:\src\phpactor\vendor\symfony\console\Application.php(978): Symfony\Component\Conso in C:\src\phpactor\vendor\amphp\amp\lib\Loop.php on line 241
Fatal error: Uncaught TypeError: Argument 1 passed to Amp\Loop::onSignal() must be of the type int, string given, called in C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php on line 104 and defined in C:\src\phpactor\vendor\amphp\amp\lib\Loop.php:241
Stack trace:
#0 C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php(104): Amp\Loop::onSignal('SIGINT', Object(Closure))
#1 C:\src\phpactor\vendor\phpactor\language-server-extension\lib\LanguageServer\Command\StartCommand.php(59): Phpactor\LanguageServer\Core\Server\LanguageServer->run()
#2 C:\src\phpactor\vendor\symfony\console\Command\Command.php(299): Phpactor\Extension\LanguageServer\Command\StartCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 C:\src\phpactor\vendor\symfony\console\Application.php(978): Symfony\Component\Conso in C:\src\phpactor\vendor\amphp\amp\lib\Loop.php on line 241
These errors are due to missing SIGINT, defined in pcntl extension, which is not available on Windows.
I've added define ("SIGINT", 2); in \vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php and checked again:
# bin/phpactor language-server -vvv
Starting language server, use -vvv for verbose output
In NativeDriver.php line 91:
[Amp\Loop\UnsupportedFeatureException]
Signal handling requires the pcntl extension
Exception trace:
at C:\src\phpactor\vendor\amphp\amp\lib\Loop\NativeDriver.php:91
Amp\Loop\NativeDriver->onSignal() at C:\src\phpactor\vendor\amphp\amp\lib\Loop.php:243
Amp\Loop::onSignal() at C:\src\phpactor\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php:104
Phpactor\LanguageServer\Core\Server\LanguageServer->run() at C:\src\phpactor\vendor\phpactor\language-server-extension\lib\LanguageServer\Command\StartCommand.php:59
Phpactor\Extension\LanguageServer\Command\StartCommand->execute() at C:\src\phpactor\vendor\symfony\console\Command\Command.php:299
Symfony\Component\Console\Command\Command->run() at C:\src\phpactor\vendor\symfony\console\Application.php:978
Symfony\Component\Console\Application->doRunCommand() at C:\src\phpactor\vendor\symfony\console\Application.php:295
Symfony\Component\Console\Application->doRun() at C:\src\phpactor\lib\Application.php:54
Phpactor\Application->doRun() at C:\src\phpactor\vendor\symfony\console\Application.php:167
Symfony\Component\Console\Application->run() at C:\src\phpactor\bin\phpactor:42
language-server [--address ADDRESS] [--no-loop]
The same behavior should be reproduced on non-Windows systems by disabling the pcntl extension.
The text was updated successfully, but these errors were encountered:
I was looking for an alternative to felixfbecker/php-language-server in VSCode, since it seems a bit abandoned (latest commit was 12 Dec 2018).
I've found phpactor/vscode-phpactor extension and tried it, but it won't even start.
I've patched the extension to let the server start (Windows path were not taken into account to let the server start...), and I've found that it crashes immediately on my Win10-x64.
First error:
These errors are due to missing
SIGINT
, defined inpcntl
extension, which is not available on Windows.I've added
define ("SIGINT", 2);
in\vendor\phpactor\language-server\lib\Core\Server\LanguageServer.php
and checked again:The same behavior should be reproduced on non-Windows systems by disabling the
pcntl
extension.The text was updated successfully, but these errors were encountered: