felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.16k stars 185 forks source link

ErrorException: Method ReflectionParameter::getClass() is depricated in StandardTagFactory.php 241 #801

Open pardmeister opened 3 years ago

pardmeister commented 3 years ago

Hi

I get the following error everytime I open vscode with C++ or JavaScript projects. Don't see it with PHP though.

Intellisense v2.3.14 Mac OS X v11.1 VSCode v1.52.1

ErrorException: Method ReflectionParameter::getClass() is deprecated in .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:241
Stack trace:
#0 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php(241): {closure}(8192, 'Method Reflecti...', '/Users/kabelo/....', 241)
#1 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php(198): phpDocumentor\Reflection\DocBlock\StandardTagFactory->getArgumentsForParametersFromWiring(Array, Array)
#2 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php(122): phpDocumentor\Reflection\DocBlock\StandardTagFactory->createTag('ClientCapabilit...', 'param', Object(phpDocumentor\Reflection\Types\Context))
#3 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php(231): phpDocumentor\Reflection\DocBlock\StandardTagFactory->create('@param ClientCa...', Object(phpDocumentor\Reflection\Types\Context))
#4 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php(96): phpDocumentor\Reflection\DocBlockFactory->parseTagBlock('@param ClientCa...', Object(phpDocumentor\Reflection\Types\Context))
#5 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/felixfbecker/advanced-json-rpc/lib/Dispatcher.php(98): phpDocumentor\Reflection\DocBlockFactory->create('/**\n     * The ...', Object(phpDocumentor\Reflection\Types\Context))
#6 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/felixfbecker/language-server/src/LanguageServer.php(131): AdvancedJsonRpc\Dispatcher->dispatch(Object(AdvancedJsonRpc\Request))
#7 [internal function]: LanguageServer\LanguageServer->LanguageServer\{closure}()
#8 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/coroutine.php(64): Generator->valid()
#9 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/coroutine.php(118): Sabre\Event\{closure}()
#10 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/felixfbecker/language-server/src/LanguageServer.php(154): Sabre\Event\coroutine(Object(Closure))
#11 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/EmitterTrait.php(88): LanguageServer\LanguageServer->LanguageServer\{closure}(Object(LanguageServer\Message))
#12 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/felixfbecker/language-server/src/ProtocolStreamReader.php(56): Sabre\Event\Emitter->emit('message', Array)
#13 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/Loop/Loop.php(311): LanguageServer\ProtocolStreamReader->LanguageServer\{closure}()
#14 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/Loop/Loop.php(233): Sabre\Event\Loop\Loop->runStreams(NULL)
#15 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/Loop/Loop.php(194): Sabre\Event\Loop\Loop->tick(true)
#16 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/sabre/event/lib/Loop/functions.php(122): Sabre\Event\Loop\Loop->run()
#17 .vscode/extensions/felixfbecker.php-intellisense-2.3.14/vendor/felixfbecker/language-server/bin/php-language-server.php(55): Sabre\Event\Loop\run()
#18 {main}
bravedave commented 3 years ago

Hi - I'm seeing this with php projects And the line is the same Just in last few days

Intellisense v2.3.14 Win 10 VSCode v1.52.1

I'm running PHP8 though, expect this could be related to that

Cheers

petercoles commented 3 years ago

+1

Intellisense v2.3.14 VSCode v1.52.1 PHP 8 I'm running vscode inside a docker container with OS Debian GNU/Linux 10 (buster).

I also suspect that the referenced class method has been deprecated in PHP8.

stephenhoult commented 3 years ago

+1

macOS Big Sur 11.2 Intellisense v2.3.14 VSCode v1.52.1 PHP 8.0.1

I believe this was fixed in v5.2 of phpDocumentor/ReflectionDocBlock (https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.2.0) with this PR.

kevikanon commented 3 years ago

+1

Win 10 Intellisense v2.3.14 VSCode v1.57.1 PHP 7.4.19