TysonAndre / vscode-php-phan

Phan - PHP Static Analysis for VS Code
Other
24 stars 4 forks source link

Connection to server is erroring. Shutting down server. #85

Closed terabytesoftw closed 4 years ago

terabytesoftw commented 4 years ago
Q A
php 7.4.7
vscode: 1.46.0
windows: 10 Pro N
ast: 1.0.6 x-64

image

TysonAndre commented 4 years ago

Was this working in an earlier vscode-php-phan version?

Do you see any additional output setting phan.enableDebugLog to true, and restarting vs code?

Have you set up .phan/config.php for the project? Do you see any errors or any output running php C:\Users\...\vendor\phan\phan\phan within the directory of the project you're analyzing through the command prompt?

terabytesoftw commented 4 years ago

Was this working in an earlier vscode-php-phan version? Yes

Have you set up .phan/config.php for the project? Yes

image

TysonAndre commented 4 years ago

If you scroll down, do you see any errors before the language server disconnects?

Do you see any errors or any output running php C:\Users...\vendor\phan\phan\phan within the directory of the project you're analyzing through the command prompt?

terabytesoftw commented 4 years ago

image

Do you see any errors or any output running php C:\Users...\vendor\phan\phan\phan within the directory of the project you're analyzing through the command prompt?

.phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:32 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\QualifiedName                     .phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:35 PhanUndeclaredClassProperty Reference to instance property globalSpecifier from undeclared class \Microsoft\PhpParser\Node\QualifiedNa me                                                                                                                                                                                              .phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:35 PhanUndeclaredClassProperty Reference to instance property relativeSpecifier from undeclared class \Microsoft\PhpParser\Node\Qualified Name                                                                                                                                                                                            .phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:43 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Expression\CallExpression         .phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:43 PhanUndeclaredClassProperty Reference to instance property parent from undeclared class \Microsoft\PhpParser\Node\QualifiedName        .phan/plugins\NotFullyQualifiedUsagePlugin\fixers.php:74 PhanUndeclaredClassMethod Call to method getStart from undeclared class \Microsoft\PhpParser\Node\QualifiedName                        .phan/plugins\PHPDocRedundantPlugin\Fixers.php:49 PhanUndeclaredTypeParameter Parameter $declaration has undeclared type \Microsoft\PhpParser\FunctionLike                                      .phan/plugins\PHPDocRedundantPlugin\Fixers.php:51 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)           .phan/plugins\PHPDocRedundantPlugin\Fixers.php:60 PhanUndeclaredClassMethod Call to method getText from undeclared class \Microsoft\PhpParser\Token                                             .phan/plugins\PHPDocRedundantPlugin\Fixers.php:68 PhanUndeclaredTypeParameter Parameter $comment_token has undeclared type \Microsoft\PhpParser\Token                                           .phan/plugins\PHPDocRedundantPlugin\Fixers.php:71 PhanUndeclaredClassMethod Call to method getEndPosition from undeclared class \Microsoft\PhpParser\Token                                      .phan/plugins\PHPDocRedundantPlugin\Fixers.php:72 PhanUndeclaredClassProperty Reference to instance property start from undeclared class \Microsoft\PhpParser\Token                             .phan/plugins\PHPDocRedundantPlugin\Fixers.php:140 PhanUndeclaredTypeParameter Parameter $node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)                     .phan/plugins\PHPDocRedundantPlugin\Fixers.php:140 PhanUndeclaredTypeReturnType Return type of getDocCommentToken() is undeclared type ?\Microsoft\PhpParser\Token                              .phan/plugins\PHPDocRedundantPlugin\Fixers.php:145 PhanUndeclaredClassConstant Reference to constant SourceElements from undeclared class \Microsoft\PhpParser\ParseContext                     .phan/plugins\PHPDocRedundantPlugin\Fixers.php:151 PhanUndeclaredClassConstant Reference to constant DocCommentToken from undeclared class \Microsoft\PhpParser\TokenKind                       .phan/plugins\PHPDocRedundantPlugin\Fixers.php:158 PhanUndeclaredTypeReturnType Return type of findFunctionLikeDeclaration() is undeclared type ?\Microsoft\PhpParser\FunctionLike              .phan/plugins\PHPDocRedundantPlugin\Fixers.php:165 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\MethodDeclaration                       .phan/plugins\PHPDocRedundantPlugin\Fixers.php:165 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclaration           .phan/plugins\PHPDocRedundantPlugin\Fixers.php:166 PhanUndeclaredClassProperty Reference to instance property name from undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclaratio n                                                                                                                                                                                               .phan/plugins\PHPDocRedundantPlugin\Fixers.php:174 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreationExp ression                                                                                                                                                                                         .phan/plugins\PHPDocRedundantPlugin\Fixers.php:181 PhanTypeMismatchReturn Returning $candidates[0] of type \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreationExpression\|\Microsoft\ PhpParser\Node\MethodDeclaration\|\Microsoft\PhpParser\Node\Statement\FunctionDeclaration but findFunctionLikeDeclaration() is declared to return ?\Microsoft\PhpParser\FunctionLike             .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:65 PhanUndeclaredTypeParameter Parameter $declaration has undeclared type \Microsoft\PhpParser\FunctionLike                                    .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:71 PhanUndeclaredClassProperty Reference to instance property anonymousFunctionUseClause from undeclared class \Microsoft\PhpParser\FunctionLi ke                                                                                                                                                                                              .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:71 PhanUndeclaredClassProperty Reference to instance property closeParen from undeclared class \Microsoft\PhpParser\FunctionLike               .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:72 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Token                                       .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:76 PhanUndeclaredClassMethod Call to method getEndPosition from undeclared class \Microsoft\PhpParser\Token                                    .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:81 PhanUndeclaredTypeParameter Parameter $declaration has undeclared type \Microsoft\PhpParser\FunctionLike                                    .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:87 PhanUndeclaredClassProperty Reference to instance property parameters from undeclared class \Microsoft\PhpParser\FunctionLike               .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:89 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Parameter (Did you mean class \Phan\La nguage\Element\Parameter or class \Phan\Language\Element\Comment\Parameter)                                                                                                                     .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:92 PhanUndeclaredClassProperty Reference to instance property variableName from undeclared class \Microsoft\PhpParser\Node\Parameter           .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:96 PhanUndeclaredClassProperty Reference to instance property byRefToken from undeclared class \Microsoft\PhpParser\Node\Parameter             .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:96 PhanUndeclaredClassProperty Reference to instance property dotDotDotToken from undeclared class \Microsoft\PhpParser\Node\Parameter         .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:96 PhanUndeclaredClassProperty Reference to instance property variableName from undeclared class \Microsoft\PhpParser\Node\Parameter           .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:104 PhanUndeclaredTypeReturnType Return type of findFunctionLikeDeclaration() is undeclared type ?\Microsoft\PhpParser\FunctionLike            .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:111 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\MethodDeclaration                     .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:111 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclaration         .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:112 PhanUndeclaredClassProperty Reference to instance property name from undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclarat ion                                                                                                                                                                                             .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:120 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreationE xpression                                                                                                                                                                                       .phan/plugins\PHPDocToRealTypesPlugin\Fixers.php:127 PhanTypeMismatchReturn Returning $candidates[0] of type \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreationExpression\|\Microsof t\PhpParser\Node\MethodDeclaration\|\Microsoft\PhpParser\Node\Statement\FunctionDeclaration but findFunctionLikeDeclaration() is declared to return ?\Microsoft\PhpParser\FunctionLike           .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:68 PhanUndeclaredTypeParameter Parameter $declaration has undeclared type \Microsoft\PhpParser\FunctionLike                                   .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:72 PhanUndeclaredClassProperty Reference to instance property returnType from undeclared class \Microsoft\PhpParser\FunctionLike              .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:73 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)        .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:79 PhanUndeclaredClassMethod Call to method getStart from undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)           .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:80 PhanUndeclaredClassMethod Call to method getEndPosition from undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)     .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:88 PhanUndeclaredTypeParameter Parameter $declaration has undeclared type \Microsoft\PhpParser\FunctionLike                                   .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:93 PhanUndeclaredClassProperty Reference to instance property returnType from undeclared class \Microsoft\PhpParser\FunctionLike              .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:98 PhanUndeclaredClassProperty Reference to instance property parameters from undeclared class \Microsoft\PhpParser\FunctionLike              .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:100 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Parameter (Did you mean class \Phan\ Language\Element\Parameter or class \Phan\Language\Element\Comment\Parameter)                                                                                                                   .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:103 PhanUndeclaredClassProperty Reference to instance property variableName from undeclared class \Microsoft\PhpParser\Node\Parameter         .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:107 PhanUndeclaredClassProperty Reference to instance property typeDeclaration from undeclared class \Microsoft\PhpParser\Node\Parameter      .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:112 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Token                                     .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:112 PhanUndeclaredClassProperty Reference to instance property start from undeclared class \Microsoft\PhpParser\Token                         .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:113 PhanUndeclaredClassMethod Call to method getEndPosition from undeclared class \Microsoft\PhpParser\Token                                  .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:120 PhanUndeclaredTypeReturnType Return type of findFunctionLikeDeclaration() is undeclared type ?\Microsoft\PhpParser\FunctionLike           .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:127 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\MethodDeclaration                    .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:127 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclaration        .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:128 PhanUndeclaredClassProperty Reference to instance property name from undeclared class \Microsoft\PhpParser\Node\Statement\FunctionDeclara tion                                                                                                                                                                                            .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:136 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreation Expression                                                                                                                                                                                      .phan/plugins\PreferNamespaceUsePlugin\Fixers.php:143 PhanTypeMismatchReturn Returning $candidates[0] of type \Microsoft\PhpParser\Node\Expression\AnonymousFunctionCreationExpression\|\Microso ft\PhpParser\Node\MethodDeclaration\|\Microsoft\PhpParser\Node\Statement\FunctionDeclaration but findFunctionLikeDeclaration() is declared to return ?\Microsoft\PhpParser\FunctionLike          src\Phan\AST\Parser.php:392 PhanUndeclaredClassMethod Call to method getLineNumberForOffset from undeclared class \Microsoft\PhpParser\FilePositionMap                                          src\Phan\AST\Parser.php:401 PhanUndeclaredClassMethod Call to method getLineNumberForOffset from undeclared class \Microsoft\PhpParser\FilePositionMap                                          src\Phan\AST\Parser.php:423 PhanUndeclaredTypeParameter Parameter $errors has undeclared type list<\Microsoft\PhpParser\Diagnostic> (Did you mean class \Phan\LanguageServer\Protocol\Diagnosti c)                                                                                                                                                                                              src\Phan\AST\Parser.php:444 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Microsoft\PhpParser\FilePositionMap                                                     src\Phan\AST\Parser.php:447 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Diagnostic                                               src\Phan\AST\Parser.php:448 PhanUndeclaredClassProperty Reference to instance property start from undeclared class \Microsoft\PhpParser\Diagnostic                                              src\Phan\AST\Parser.php:449 PhanUndeclaredClassProperty Reference to instance property message from undeclared class \Microsoft\PhpParser\Diagnostic                                            src\Phan\AST\Parser.php:451 PhanUndeclaredClassMethod Call to method getLineNumberForOffset from undeclared class \Microsoft\PhpParser\FilePositionMap                                          src\Phan\AST\TolerantASTConverter\CachingTolerantASTConverter.php:27 PhanUndeclaredTypeParameter Parameter $errors has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \P han\LanguageServer\Protocol\Diagnostic)                                                                                                                                                         src\Phan\AST\TolerantASTConverter\CachingTolerantASTConverter.php:27 PhanUndeclaredTypeReturnType Return type of phpParserParse() is undeclared type \Microsoft\PhpParser\Node\SourceFileNode   src\Phan\AST\TolerantASTConverter\CachingTolerantASTConverter.php:36 PhanTypeMismatchReturn Returning $entry->node of type \Microsoft\PhpParser\Node but phpParserParse() is declared to return  \Microsoft\PhpParser\Node\SourceFileNode                                                                                                                                                       src\Phan\AST\TolerantASTConverter\CachingTolerantASTConverter.php:45 PhanTypeMismatchArgument Argument 1 ($node) is $node of type \Microsoft\PhpParser\Node\SourceFileNode but \Phan\AST\Tolera ntASTConverter\PhpParserNodeEntry::__construct() takes \Microsoft\PhpParser\Node defined at src\Phan\AST\TolerantASTConverter\PhpParserNodeEntry.php:27                                         src\Phan\AST\TolerantASTConverter\NodeDumper.php:91 PhanUndeclaredTypeParameter Parameter $ast_node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)                src\Phan\AST\TolerantASTConverter\NodeDumper.php:105 PhanUndeclaredTypeParameter Parameter $token has undeclared type \Microsoft\PhpParser\Token                                                src\Phan\AST\TolerantASTConverter\NodeDumper.php:120 PhanUndeclaredTypeParameter Parameter $ast_node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)               src\Phan\AST\TolerantASTConverter\NodeDumper.php:120 PhanUndeclaredTypeParameter Parameter $ast_node has undeclared type \Microsoft\PhpParser\Token                                             src\Phan\AST\TolerantASTConverter\NodeDumper.php:122 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)        src\Phan\AST\TolerantASTConverter\NodeDumper.php:128 PhanUndeclaredClassMethod Call to method getStart from undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\Node)           src\Phan\AST\TolerantASTConverter\NodeDumper.php:132 PhanUndeclaredClassMethod Call to method getChildNodesAndTokens from undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\N ode)                                                                                                                                                                                            src\Phan\AST\TolerantASTConverter\NodeDumper.php:136 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Token                                      src\Phan\AST\TolerantASTConverter\NodeDumper.php:142 PhanUndeclaredClassMethod Call to method getTokenKindNameFromValue from undeclared class \Microsoft\PhpParser\Token                        src\Phan\AST\TolerantASTConverter\NodeDumper.php:142 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Token                           src\Phan\AST\TolerantASTConverter\NodeDumper.php:143 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Token                           src\Phan\AST\TolerantASTConverter\NodeDumper.php:144 PhanUndeclaredClassProperty Reference to instance property start from undeclared class \Microsoft\PhpParser\Token                          src\Phan\AST\TolerantASTConverter\NodeDumper.php:145 PhanUndeclaredClassProperty Reference to instance property fullStart from undeclared class \Microsoft\PhpParser\Token                      src\Phan\AST\TolerantASTConverter\NodeDumper.php:145 PhanUndeclaredClassProperty Reference to instance property length from undeclared class \Microsoft\PhpParser\Token                         src\Phan\AST\TolerantASTConverter\NodeDumper.php:163 PhanUndeclaredTypeParameter Parameter $ast_node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)               src\Phan\AST\TolerantASTConverter\NodeDumper.php:163 PhanUndeclaredTypeParameter Parameter $ast_node has undeclared type \Microsoft\PhpParser\Token                                             src\Phan\AST\TolerantASTConverter\NodeUtils.php:32 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Token                                                      src\Phan\AST\TolerantASTConverter\NodeUtils.php:34 PhanUndeclaredClassMethod Call to method getText from undeclared class \Microsoft\PhpParser\Token                                            src\Phan\AST\TolerantASTConverter\NodeUtils.php:35 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Token                             src\Phan\AST\TolerantASTConverter\NodeUtils.php:36 PhanUndeclaredClassConstant Reference to constant VariableName from undeclared class \Microsoft\PhpParser\TokenKind                          src\Phan\AST\TolerantASTConverter\NodeUtils.php:45 PhanUndeclaredTypeParameter Parameter $name has undeclared type \Microsoft\PhpParser\Node\QualifiedName                                      src\Phan\AST\TolerantASTConverter\NodeUtils.php:47 PhanUndeclaredClassProperty Reference to instance property nameParts from undeclared class \Microsoft\PhpParser\Node\QualifiedName           src\Phan\AST\TolerantASTConverter\ParseResult.php:21 PhanUndeclaredTypeProperty Property \Phan\AST\TolerantASTConverter\ParseResult->diagnostics has undeclared type \Microsoft\PhpParser\Diagn ostic[] (Did you mean class \Phan\LanguageServer\Protocol\Diagnostic)                                                                                                                           src\Phan\AST\TolerantASTConverter\ParseResult.php:26 PhanUndeclaredTypeParameter Parameter $diagnostics has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \Phan\Languag eServer\Protocol\Diagnostic)                                                                                                                                                                    src\Phan\AST\TolerantASTConverter\PhpParserNodeEntry.php:20 PhanUndeclaredTypeProperty Property \Phan\AST\TolerantASTConverter\PhpParserNodeEntry->node has undeclared type \Microsoft\PhpParse r\Node (Did you mean class \ast\Node)                                                                                                                                                           src\Phan\AST\TolerantASTConverter\PhpParserNodeEntry.php:22 PhanUndeclaredTypeProperty Property \Phan\AST\TolerantASTConverter\PhpParserNodeEntry->errors has undeclared type \Microsoft\PhpPar ser\Diagnostic[] (Did you mean class \Phan\LanguageServer\Protocol\Diagnostic)                                                                                                                  src\Phan\AST\TolerantASTConverter\PhpParserNodeEntry.php:27 PhanUndeclaredTypeParameter Parameter $errors has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \Phan\Langu ageServer\Protocol\Diagnostic)                                                                                                                                                                  src\Phan\AST\TolerantASTConverter\PhpParserNodeEntry.php:27 PhanUndeclaredTypeParameter Parameter $node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:119 PhanUndeclaredClassConstant Reference to constant OpenBraceDollarToken from undeclared class \Microsoft\PhpParser\TokenKind      src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:120 PhanUndeclaredClassConstant Reference to constant OpenBraceToken from undeclared class \Microsoft\PhpParser\TokenKind            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:121 PhanUndeclaredClassConstant Reference to constant DollarOpenBraceToken from undeclared class \Microsoft\PhpParser\TokenKind      src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:122 PhanUndeclaredClassConstant Reference to constant CloseBraceToken from undeclared class \Microsoft\PhpParser\TokenKind           src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:150 PhanUndeclaredTypeProperty Property \Phan\AST\TolerantASTConverter\TolerantASTConverter::$file_position_map has undeclared type  \Microsoft\PhpParser\FilePositionMap                                                                                                                                                            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:191 PhanUndeclaredTypeParameter Parameter $errors has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \Phan\La nguageServer\Protocol\Diagnostic)                                                                                                                                                               src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:219 PhanUndeclaredTypeParameter Parameter $errors has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \Phan\La nguageServer\Protocol\Diagnostic)                                                                                                                                                               src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:223 PhanTypeMismatchArgument Argument 1 ($parser_node) is $parser_node of type \Microsoft\PhpParser\Node\SourceFileNode but \Phan\AS T\TolerantASTConverter\TolerantASTConverter::phpParserToPhpast() takes \Microsoft\PhpParser\Node defined at src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:267                      src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:235 PhanUndeclaredTypeParameter Parameter $root has undeclared type \Microsoft\PhpParser\Node\SourceFileNode                         src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:239 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Microsoft\PhpParser\Node\SourceFileNode              src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:240 PhanUndeclaredClassProperty Reference to instance property fileContents from undeclared class \Microsoft\PhpParser\Node\SourceFi leNode                                                                                                                                                                                          src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:242 PhanUndeclaredClassMethod Call to method getDescendantNodes from undeclared class \Microsoft\PhpParser\Node\SourceFileNode       src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:245 PhanUndeclaredClassProperty Reference to instance property parent from undeclared class \Microsoft\PhpParser\Node\SourceFileNode src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:251 PhanUndeclaredTypeParameter Parameter $errors has undeclared type \Microsoft\PhpParser\Diagnostic[] (Did you mean class \Phan\La nguageServer\Protocol\Diagnostic)                                                                                                                                                               src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:251 PhanUndeclaredTypeReturnType Return type of phpParserParse() is undeclared type \Microsoft\PhpParser\Node\SourceFileNode         src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:253 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Microsoft\PhpParser\Parser (Did you mean class \Phan \AST\Parser)                                                                                                                                                                                    src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:254 PhanUndeclaredClassMethod Call to method parseSourceFile from undeclared class \Microsoft\PhpParser\Parser (Did you mean class \ Phan\AST\Parser)                                                                                                                                                                                src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:255 PhanUndeclaredClassMethod Call to method getDiagnostics from undeclared class \Microsoft\PhpParser\DiagnosticsProvider           src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:267 PhanUndeclaredTypeParameter Parameter $parser_node has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)  src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:283 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Microsoft\PhpParser\FilePositionMap                  src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:293 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:293 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Node[] (Did you mean class \ast\Node)          src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:293 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Token                                          src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:293 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Token[]                                        src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:319 PhanUndeclaredTypeParameter Parameter $parser_nodes has undeclared type \Microsoft\PhpParser\Node[] (Did you mean class \ast\Nod e)                                                                                                                                                                                              src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:319 PhanUndeclaredTypeParameter Parameter $parser_nodes has undeclared type \Microsoft\PhpParser\Node\StatementNode                  src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:319 PhanUndeclaredTypeParameter Parameter $parser_nodes has undeclared type \Microsoft\PhpParser\Token                               src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:321 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Statement\CompoundStatement Node                                                                                                                                                                                            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:322 PhanUndeclaredClassProperty Reference to instance property statements from undeclared class \Microsoft\PhpParser\Node\Statement\ CompoundStatementNode                                                                                                                                                                           src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:323 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\StatementNode               src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:324 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node\Statement\EmptyStatement    src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:329 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Token                            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:330 PhanUndeclaredClassConstant Reference to constant SemicolonToken from undeclared class \Microsoft\PhpParser\TokenKind            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:330 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Token                 src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:374 PhanUndeclaredTypeParameter Parameter $expressions_list has undeclared type \Microsoft\PhpParser\Node\DelimitedList\ExpressionLi st                                                                                                                                                                                              src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:377 PhanUndeclaredClassProperty Reference to instance property children from undeclared class \Microsoft\PhpParser\Node\DelimitedLis t\ExpressionList                                                                                                                                                                                src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:379 PhanUndeclaredClassConstant Reference to constant CommaToken from undeclared class \Microsoft\PhpParser\TokenKind                src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:379 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Token                            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:379 PhanUndeclaredClassProperty Reference to instance property kind from undeclared class \Microsoft\PhpParser\Token                 src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:413 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:413 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Token                                          src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:425 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Node (Did you mean class \ast\Node)            src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:425 PhanUndeclaredTypeParameter Parameter $n has undeclared type \Microsoft\PhpParser\Token                                          src\Phan\AST\TolerantASTConverter\TolerantASTConverter.php:426 PhanUndeclaredClassInstanceof Checking instanceof against undeclared class \Microsoft\PhpParser\Node (Did you mean class \ast\No de)
--
TysonAndre commented 4 years ago

If you open the settings menu, click on the settings(gear) icon, then on "Install another version", and on 1.2.4, then restart vs code, does it work?

Did you upgrade to php 7.4.7 before or after the phan extension for vs code was upgraded from 1.2.4 to 2.0.0?

terabytesoftw commented 4 years ago

If you open the settings menu, click on the settings(gear) icon, then on "Install another version", and on 1.2.4, then restart vs code, does it work? No works

Did you upgrade to php 7.4.7 before or after the phan extension for vs code was upgraded from 1.2.4 to 2.0.0? after

TysonAndre commented 4 years ago

What is the full output of php -m? (E.g. extensions such as uopz, grpc, xdebug may cause issues with phan, or extensions with buggy Reflection info. Probably only uopz on windows)

Do you see any issues running phan --daemonize-tcp-port default in one window and vendor\phan\phan\phan_client --use-fallback-parser -l src/somepathwithintheprojec.php in the other window (issues affecting the language server may also affect the daemon in an easier to debug way)

TysonAndre commented 4 years ago

What happens if you do the following?

  1. Download the zip from https://github.com/phan/phan/releases/tag/3.0.2 (or check out the branch)
  2. Run composer install
  3. Run PHAN_RUN_INTEGRATION_TEST=1 vendor/phpunit/phpunit/phpunit tests/Phan/LanguageServer/LanguageServerIntegrationTest.php Run set PHAN_RUN_INTEGRATION_TEST=1, then run php vendor/phpunit/phpunit/phpunit tests/Phan/LanguageServer/LanguageServerIntegrationTest.php (updated for windows) in php 7.4.7

Also, what happens if you install php 7.2.31 and use it instead to run vscode-php-phan 2.0.0

TysonAndre commented 4 years ago

I'm seeing some potentially related bugs in https://github.com/php/php-src/blob/PHP-7.4/NEWS such as https://bugs.php.net/bug.php?id=79657 fixed after 7.4.7 , but I'm not certain if any of them are actually the cause or if it's a bug in Phan itself.

terabytesoftw commented 4 years ago

[PHP Modules] ast bcmath bz2 calendar Core ctype curl date dom fileinfo filter ftp gd gettext hash iconv intl json ldap libxml mbstring mysqli mysqlnd openssl pcov pcre PDO pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar readline Reflection session SimpleXML soap sockets SPL sqlite3 standard tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib [Zend Modules]

image

TysonAndre commented 4 years ago

That's definitely a bug in Phan's daemon mode. I can reproduce it when analyzing files outside of the project that the phan daemon was started in (php C:\...\vendor\phan\phan\phan should be started from within d:\git-local\yii-extension\app, not from within Phan's installation directory)

Probably unrelated to the language server issue, though. The php extensions seem standard and unrelated.

TysonAndre commented 4 years ago
  1. Do you see any issues running php C:\vendor\phan\phan\phan --daemonize-tcp-port default from the root directory of the project being analyzed in one window and vendor\phan\phan\phan_client --use-fallback-parser -l src/somepathwithintheprojec.php in the other window (issues affecting the language server may also affect the daemon in an easier to debug way)
  2. Do you still see the issues if you switch to php 7.2.31 and update the environment PATH
  3. What happens when running Phan's integration test LanguageServerIntegrationTest with PHAN_RUN_INTEGRATION_TEST=1
TysonAndre commented 4 years ago

If you open the settings menu, click on the settings(gear) icon, then on "Install another version", and on 1.2.4, then restart vs code, does it work? No works

I'm not 100% sure about what you meant by that. Do you mean "no, it works" or "it does not work"?

terabytesoftw commented 4 years ago

Sorry for my bad English, now I opened another project, change the directory path and I work with php 7.4.7, I do not understand why it does not work in all projects if it is the same enviroment, I will review more thoroughly.

image

terabytesoftw commented 4 years ago

reinstall extension, disable all VSCODE extensions, reboot the machine and it works thanks for the help.