tsufeki / tenkawa-php-language-server Goto Github PK
View Code? Open in Web Editor NEWLanguage server for PHP, with powerful static analysis and type inference.
License: GNU General Public License v3.0
Language server for PHP, with powerful static analysis and type inference.
License: GNU General Public License v3.0
when i declare a var with mixed class (A|B
or A&B
), the method test
which exists class A only, can not be intelesense from the call by this var.
<?php
class A
{
public function test()
{
}
}
class B
{
}
/**
* @var A|B
*/
$x = new A;
$x->test();
and an error occur
2018-12-16T15:45:39+00:00 pid=86702 ERROR Exception during PHPStan analysis: PHPStan\Broker\ClassNotFoundException: Class \A was not found while trying to analyse it - autoloading is probably not configured properly. in /Users/***/.vscode/extensions/tsufeki.tenkawa-php-0.3.3/vendor/tsufeki/tenkawa-php-language-server/src/Tsufeki/Tenkawa/Php/PhpStan/IndexBroker.php:182
But if i declare the var as single type, or just put same method at the class B, it works fine.
I really have the pdo_sqlite
extension enabled, e.g. when i run php --info | grep sqlite
i got this response:
PDO drivers => mysql, sqlite
pdo_sqlite
and when I run a test.php
file with the following content:
<?php
echo extension_loaded('pdo_sqlite');
I got a 1
as a result.
7.3.7
.Thanks!
Currently LS runs as TCP client. Support also TCP Server
I'm attempting to use this language server with LanguageClient-neovim. It appears to work for the file/s I have open (I get diagnostics/completion) however it doesn't seem to be award of/indexing any other files in the project (or the phpstorm stubs, as it tells me built in php functions don't exist edit: fixed this with --build-index
). The client does send a rootPath
and rootUri
in the initialize
method message. Is there something else that needs to be done to trigger indexing?
Some options for disable auto import of open bracket on complete?
Problem is: ex function/method: array_merge(
But I should be: ex function/method: array_merge
Sorry for bad English...
Thanks!
When working in WordPress projects, the built-ins, constants, etc from WordPress are undefined:
I found at least one LSP stubs project for WordPress, but I would have no clue how to integrate this into your LSP implementation. Is this possible/feasible.
Here's what I found: https://packagist.org/packages/giacocorsiglia/wordpress-stubs
Thanks, your LSP is the only one to work so far for me in NeoVim with any decent success.
This is an error I get when I run server with latest PHP version 7.4
2019-12-03T14:20:02+01:00 pid=522980 ERROR Unhandled exception in strand #1: ErrorException (Function ReflectionType::__toString() is deprecated).
ErrorException: Function ReflectionType::__toString() is deprecated in /tmp/tenkawa-php-language-server/vendor/tsufeki/hmcontainer/src/Tsufeki/HmContainer/Wiring/Wiring.php:92
After installing vscode ext basic snippets (fun, class, con etc.) takes 3-5sec to apply.
Any suggestions?
Hello, there is an awesome php lang server. but i found something not perfect
* @param FirstInterface|SecondInterface $interface
* @param FirstInterface[]|array $interfaces
, it means $interfaces
should be an array, and each might be FirstInterface
Is it possible to analyse codebase with stan using --level
argument? In many other editor extensions there is such option, but this awesome ls lacks it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.