php-language-server: The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Hello, I’m getting this error since this morning an I do not know what caused or how to resolve it. I checked other similar problems and didn’t get an answer there.

My PHP version is 7.3

CRITICAL  TypeError: Argument 2 passed to LanguageServer\Index\DependenciesIndex::setDependencyIndex() must be an instance of LanguageServer\Index\Index, bool given, called in /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/felixfbecker/language-server/src/Indexer.php on line 164 and defined in /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/felixfbecker/language-server/src/Index/DependenciesIndex.php:42

Stack trace:
#0 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/felixfbecker/language-server/src/Indexer.php(164): LanguageServer\Index\DependenciesIndex->setDependencyIndex('swiftmailer/swi...', false)
#1 [internal function]: LanguageServer\Indexer->LanguageServer\{closure}()
#2 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/coroutine.php(70): Generator->send(false)
#3 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/Promise.php(242): Sabre\Event\{closure}(false)
#4 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/Loop/Loop.php(261): Sabre\Event\Promise->Sabre\Event\{closure}()
#5 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/Loop/Loop.php(215): Sabre\Event\Loop\Loop->runNextTicks()
#6 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/Loop/Loop.php(194): Sabre\Event\Loop\Loop->tick(true)
#7 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/sabre/event/lib/Loop/functions.php(122): Sabre\Event\Loop\Loop->run()
#8 /home/ashary/.vscode/extensions/felixfbecker.php-intellisense-2.3.13/vendor/felixfbecker/language-server/bin/php-language-server.php(55): Sabre\Event\Loop\run()
#9 {main}

[Info  - 6:04:31 PM] Restored filp/whoops:2.7.0 from cache
[Info  - 6:04:31 PM] Restored vlucas/phpdotenv:3.6.0 from cache
[Info  - 6:04:31 PM] Restored paragonie/random_compat:9.99.99 from cache
[Error - 6:04:31 PM] Connection to server got closed. Server will not be restarted.
DEBUG     Restarted process exited 0

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 31

Commits related to this issue

Most upvoted comments

In my case, running composer update inside the extension folder solve the problem 😃

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

i got this error. and when i update package with composer return same error in cmd Infinitely.

errot

In my case, running composer update inside the extension folder solve the problem 😃

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

Thank you for sharing this. Solved the issue on my system:

PHP 8.0.3 (cli) (built: Mar  2 2021 23:34:05) ( ZTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.3, Copyright (c) Zend Technologies
with Xdebug v3.0.3, Copyright (c) 2002-2021, by Derick Rethans

Believe it or not just let it go for about 15 to 20 mins it eventually stops and then it works with no more crashing. That’s totally what happens when you composer update in the directory

On Tue, Jun 22, 2021, 7:14 PM saeed410 @.***> wrote:

i got this error. and when i update package with composer return same error in cmd Infinitely.

[image: errot] https://user-images.githubusercontent.com/9029702/123011220-396ef580-d3d5-11eb-8068-3027ea440610.PNG

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/felixfbecker/php-language-server/issues/779#issuecomment-866397248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZ4FDMBIRUZJRCVSHAXXO3TUEKMDANCNFSM4MKVEFDQ .

In my case, running composer update inside the extension folder solve the problem 😃

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

I’m getting a lot of: Deprecation Notice: Method ReflectionParameter::getClass() is deprecated

I’m on Manjaro, PHP 8.0.7

UPDATE: Okay, patience is rewarded. The extension works now, but it consumes too much resources (CPU)… This extension sucks. Every time I open a new file my fan sound like a plane.

For me too, running composer update inside the extension folder solve the problem 😃 Thanks TgMrP

I don’t want to

In my case, running composer update inside the extension folder solve the problem 😃

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

I really hate showing how new I am to all of this. But it may help to understand what this exactly did to fix it as it might be useful for other such problems with other packages and extensions. What did the command composer update do when executed in the particular extensions directory.

In my case, running composer update inside the extension folder solve the problem 😃

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

That seems to have done it for me as well. I will keep an eye out but I re-enabled it and restarted VSCODE and didn’t get the popup error saying it had crashed anymore. WOoohooo THANKS.