1
0
Fork 0
Commit Graph

167 Commits (2b44012877f282498dfd1d9b8627c6fe697ffdad)

Author SHA1 Message Date
Jens Hausdorf a8f60c9cf6 fix(completion): do not propose <?php if completion context is not given (#593)
fixes #372
2018-02-07 11:55:25 -08:00
Felix Becker d9bc0b0285
fix(completion): don't require constructor parameter for protocol DTO (#592) 2018-02-02 12:09:25 -08:00
Phil Nelson 6894d85aaf fix(DefinitionResolver): resolve self correctly for docblock @return self (#576) 2018-01-09 01:38:18 -08:00
Felix Becker 20960a8b9f
fix(DefinitionResolver): find variables in sibling children (#568)
Fixes #566
2017-12-30 22:26:51 -08:00
Phil Nelson 1cfba8b6bb fix(DefinitionResolver): don't crash if foreach key isn't a variable (#564) 2017-12-24 17:55:48 -08:00
Phil Nelson 425b2390b5 fix(DefinitionResolver): fix crash on unknown foreach type (#562)
Fix when unknown type is found in foreach expression
2017-12-24 01:52:49 -08:00
Phil Nelson 63da051e72 fix(DefinitionResolver): fix methods with self return type (#550) 2017-12-22 18:02:37 -08:00
Phil Nelson 9eea26df71 feat: foreach completion (#551) 2017-12-17 17:55:12 -08:00
phil-nelson a40cf731f7 feat: Signature help (#547)
closes #18
2017-12-09 21:10:43 -08:00
Felix Becker 09477b747e fix(diagnostics): handle null case 2017-12-03 15:49:43 -08:00
Maarten Staa 9b1fafae58 fix(diagnostics): update checking of $this usage to only error in static methods (#545) 2017-12-03 13:42:01 -08:00
Maarten Staa 4f672c24d8 feat(diagnostics): report error when $this is used in a static method or outside a class method (#528) 2017-11-18 17:41:37 -08:00
Felix Becker 80ef8ff503
fix(indexing): properly resolve self, static and parent keywords (#532)
Previously we would dump static, self and parent as literal FQNs into the index.
2017-11-18 16:59:57 -08:00
Felix Becker b1a1875070
fix(completion): don't suggest <?php on > characer (#527)
closes #372
2017-11-15 22:38:01 -08:00
Felix Becker f00fd1b62c
fix(formatting): drop PHP CodeSniffer (#504)
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway.

BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
2017-11-04 23:57:51 -07:00
Jens Hausdorf 1edbe35609 refactor: use FunctionLike Interface (#505) 2017-10-30 03:33:19 -07:00
Felix Becker 7ae6452d1a
refactor(index): rename isGlobal to isMember (#511)
isGlobal was confusing because a non-member can be considered global vs namespaced
2017-10-29 17:45:06 -07:00
Felix Becker c74076d84f
fix(cache): bump cache version (#508)
the update of reflection-docblock means old caches are no longer valid.

fixes #507
2017-10-29 13:06:44 -07:00
Jens Hausdorf fbaa7b3cc5 refactor: use ClassLike interface (#506) 2017-10-28 12:27:32 -07:00
Tyson Andre 1db6b7bbb3 chore: fixes for unused variables and phpdoc (#496)
The identifier doesn't need to be generated for a notification to the
client, since there's no response
Add undeclared properties to TreeAnalyzer
Fix other bugs in phpdoc
2017-10-22 22:54:38 -07:00
Felix Becker 16cf8f53e9 fix(docblocks): update to phpdocumentor/reflection-docblock ^4.0.0
closes #139
2017-10-22 21:30:38 -07:00
Vincent Klaiber 3d8655d504 Update phpunit config (#488)
* Update phpunit config

* Rename DocumentHighlight class
2017-10-02 13:37:28 -07:00
Stephan Unverwerth d4443465bb Fix missing diagnostics for nodes (#484)
* Fix missing diagnostics for nodes

* Refactor TreeAnalyzer
2017-09-28 12:53:12 -07:00
John Nguyen a4739430f8 Fix memory leak issue (#459)
Closes #425
2017-08-21 22:43:17 -07:00
Ivan Bozhanov 35f33c8c91 Fluent interfaces support (#421) 2017-07-07 13:18:19 +02:00
Felix Becker fc0bf4c163 Fix workspace/xreferences (#424)
* Make Descriptors minimal

SymbolDescriptor and PackageDescriptor should only contain the minumum amount of properties needed

* Add missing use

* Fixes

* Ignore ReferenceInformation->symbol
2017-06-22 20:06:10 +02:00
Felix Becker fced1d5af6 Fix textDocument/xdefinition (#429) 2017-06-22 17:34:28 +02:00
Felix Becker 00552120ad Restrict workspace/symbol results to non-dependency symbols (#426)
This improves performance a lot and matches what other language servers do
2017-06-21 14:17:36 +02:00
Ivan Bozhanov dae3f2576c Add $this completion (#419) 2017-06-19 12:23:43 +02:00
Felix Becker a772d9a2d7 Remove content (#413) 2017-06-16 20:31:29 +02:00
Felix Becker 0e3727a8d6 Improve CompletionProvider (#412)
- Better performance
- More documentation
- Add field to Definition for global namespace fallback

Fixes #380
2017-06-16 20:31:13 +02:00
Felix Becker 4a98afe540 Fix docblock union types 2017-06-15 17:03:25 +02:00
Rob Lourens 3b633369a7 Fix error getting completions for 'new static' type (#405) 2017-06-15 12:44:03 +02:00
Nicholas Narsing 8d1732ed02 Exclude directory paths from file system search (#401)
* Exclude directories from file system search

Directories can also match the glob search pattern if their names end in ".php", which will cause a read error later since the ContentRetriever implementers are expecting files. As far as I know, the only way to fix this is to do an additional check to ensure the URI is not of a directory.

This resolves #306.
2017-06-11 23:24:17 +02:00
Felix Becker fe7e9d5800 Rename $stmts to $sourceFileNode everywhere
The root node is now a SourceFileNode, not an array
2017-06-10 21:36:16 +02:00
Jens Hausdorf 4c1d7bd1bc Add true, false, null to keywords (#396) 2017-06-10 18:47:19 +02:00
Rob Lourens f10680e441 Fix variable type from method return value, add tests (#393) 2017-06-10 11:10:15 +02:00
Jens Hausdorf 42d0c7b714 Improve handling of abstract classes (#391) 2017-06-09 22:12:32 +02:00
Sara Itani 7f427a1215 Adopt Microsoft/tolerant-php-parser (#357) 2017-06-09 20:25:30 +02:00
Stephan Unverwerth 08cf1a3fd7 Allow getting type from define() node (#363)
* Allow getting type from define() node
- fixes #364

* Add test case for DefinitionResolver
2017-04-24 11:11:40 +02:00
Jens Hausdorf b1cc7bf6b0 Support constants with define() (#347) 2017-04-17 17:03:08 +02:00
Jens Hausdorf de6aed608c Show constructors and destructors with right symbol (#346) 2017-04-09 19:44:28 +02:00
Talv 14a6d65832 Fix missing '()' for function definition (#340) 2017-04-02 00:30:10 +02:00
Jens Hausdorf 4d0a0a2a10 show anything from a doc comment block (#315) 2017-03-19 12:15:39 +01:00
Sara Itani 0de7ba8335 Ensure diagnostics are cleared on file deletion (#319)
* Ensure diagnostics are cleared on file deletion
Previously, error diagnostics would not be cleared when a file was deleted while it was closed. This would result in lingering errors in the problems view that could only be cleared by reloading the language server. This fix addresses the issue by adding support for workspace/didChangeWatchedFiles and automatically clearing diagnostics for deleted files.

* add FileEvent constructor
2017-03-01 11:18:37 +01:00
Matthew Brown 56bd465bf8 DefinitionResolver fixes (#307)
* Fix class references

* Fix return types
2017-02-20 10:28:49 +01:00
Matthew Brown cbfd70d398 Abort traversal in NodeAtPositionFinder (#305) 2017-02-18 00:28:10 +01:00
Trevor Bortins d5c54ac30f Read vendor directory from project's composer.json, if set. (#281) 2017-02-07 23:20:12 +01:00
Felix Becker 571b26a0c3 Use php_uname() instead of PHP_OS (#283) 2017-02-06 16:42:45 +01:00
Felix Becker 3c11cde9fb Include packages-dev (#282) 2017-02-06 16:35:16 +01:00