Matthew Brown
b2c0993cdc
Add framework for taint analysis to Psalm
...
Ref #611
2019-08-04 10:37:36 -04:00
Brown
f9d99498a6
Remove unused var
2019-07-31 17:30:31 -04:00
Matthew Brown
2f400381a5
Fix #1973 - bust method mutation cache when reloading language server
2019-07-28 10:05:51 -04:00
2e3s
f15cc7dd5b
Mark private properties unused when referenced only in constructor ( #1962 )
...
* Mark private properties unused when referenced only in constructor
If a private property is used only in constructor then most likely
it's a dead code since there is no need to have the class property.
But such static properties can be accessed between the calls.
* Ignore the private property issue on alter
* Fix the related dead code psalm
* Add a missing condition into the test
2019-07-21 23:29:16 -04:00
Matthew Brown
8d63d5dc4e
Add lookup for builtin functions
2019-07-18 23:30:44 -04:00
Matthew Brown
5583ae842e
Refactor signature selection a little
2019-07-18 23:08:54 -04:00
Matthew Brown
74e1b521a5
Add support for completing builtin class names
...
Fixes #1863
2019-07-17 22:50:57 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Tyson Andre
af52ad245a
Remove unused variables ( #1898 )
2019-07-04 15:17:28 -04:00
Matthew Brown
df3d7e1d2c
Make line endings mostly all the same
2019-07-03 16:58:27 -04:00
Brown
5c76b3c82d
Fix #1888 - add go-to-variable
2019-07-01 18:48:33 -04:00
Brown
2e1493be73
Pop open signature help when filling in function in VS Code
2019-07-01 17:50:00 -04:00
Ilija Tovilo
67c3726254
Implement signature help - closes #1841 ( #1862 )
...
* Implement signature help - closes #1841
* Add explicit signature count
* [LSP] Do analysis for every signatureHelp request
See here: https://github.com/vimeo/psalm/pull/1862#issuecomment-507007346
* Don’t language server information when checking property for init
* Fix signature help for functions
* Add try-catch around signature help Functions::getStorage()
2019-07-01 15:54:32 -04:00
Matthew Brown
36e2ea6881
Fix #1822 - update use statements with classes
2019-06-30 11:12:50 -04:00
Matthew Brown
ca53019d6b
Simplify class completion lookup
...
Ref #1822
2019-06-29 21:32:26 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Ilija Tovilo
16768e363c
Jump between parens when autocompleting method with parameters ( #1839 )
2019-06-24 07:51:12 -04:00
Ilija Tovilo
78588ced16
Only add newlines to function signature on hover ( #1834 )
...
Most editors do not render the newlines for autocompletions which makes
things look worse.
2019-06-22 15:59:16 -04:00
Brown
aa6677a177
Add autocompletion for some classes
...
Ref #1822
2019-06-21 17:10:35 -04:00
Ilija Tovilo
c74e196e3c
Improve autocompletion by using CompletionItem::$detail for type info ( #1831 )
2019-06-21 17:09:01 -04:00
Josh Di Fabio
bbe5773fa1
LS Completion: Improve filtering
...
Set `filterText` to member name so that visibility
and 'function' are not used by the IDE when filtering
completion items as the user types.
2019-06-13 21:06:08 -04:00
Josh Di Fabio
cb864206a2
LS Completion: Sort items by visibility first
2019-06-13 21:06:08 -04:00
Josh Di Fabio
ca19353645
Fix bad array_merge logic
2019-06-13 21:06:08 -04:00
Josh Di Fabio
eab4adc6e1
LS Completion: Do not suggest static members when gap is ->
2019-06-13 21:06:08 -04:00
Brown
0ba535d179
Fix problem locating end of completion area
2019-06-12 13:43:35 -04:00
Josh Di Fabio
3db32f2274
Enable LS completion when whitespace follows known type
...
This change enables completion when there is whitespace following
a known type and an object access operator, e.g.:
$foo
->bar()
->baz();
2019-06-12 09:17:50 -04:00
Brown
f309c755f8
Add ability to move classes
2019-06-05 08:50:24 -04:00
Matthew Brown
a9809ab28a
Add property moving & renaming
2019-06-04 00:32:19 -04:00
Matthew Brown
2439a9f6a0
Allow instance method renaming, too
2019-06-02 12:02:39 -04:00
Matthew Brown
cc89b9254d
Add initial ideas for moving static methods
...
Ref #1595
2019-06-01 00:56:54 -04:00
Ilija Tovilo
5a14e4b1cf
Progress bar ( #1709 )
...
* Revert "Revert "Implement better progress""
This reverts commit 4302596654
.
* Revert "Revert "Implement dots progress bar""
This reverts commit e41733d789
.
* Revert "Revert "Switch to VoidProgress by default""
This reverts commit 304ffeb0a3
.
* Revert "Revert "Pass success flag to progress""
This reverts commit 62a690ee4e
.
* Improve socket communication
* Use an underscore
* Add means to disable progress
* Add extra newline before progress bar
2019-05-30 10:30:41 -04:00
Matthew Brown
4302596654
Revert "Implement better progress"
...
This reverts commit 042070d0fd
.
2019-05-27 13:07:02 -04:00
Matthew Brown
304ffeb0a3
Revert "Switch to VoidProgress by default"
...
This reverts commit 63b46be361
.
2019-05-27 13:04:38 -04:00
Ilija Tovilo
63b46be361
Switch to VoidProgress by default
2019-05-26 23:18:48 -04:00
Ilija Tovilo
042070d0fd
Implement better progress
2019-05-26 23:18:48 -04:00
Brown
963d5bb901
Fix #1656 - allow chained call completion
2019-05-17 12:38:29 -04:00
Brown
a1c9ad501b
Fix #1654 - understand templated completions
2019-05-17 12:11:27 -04:00
Josh Di Fabio
92ef851b9c
LanguageServer: Handle late completion requests
...
Currently, Psalm Language Server is only able to handle completion
requests where the gap between a recent known type and the current
cursor position is exactly '->' or '::'. However, VS code often doesn't
send a completion request until an additional, third character has
been typed. This change allows Psalm to successfully serve
completion requests where an additional character has been typed.
2019-05-17 11:28:20 -04:00
Matthew Brown
a34692fca0
Prevent crash when a class definition cannot be located
2019-05-14 23:49:15 -04:00
Ilija Tovilo
2c36a10ac8
Fix #1622 - add allow-backwards-incompatible-changes flag to psalter
...
The flag prevents psalter from adding native return types
2019-05-13 17:59:31 -04:00
Brown
fea9faaec5
Allow psalter to be used in multithreaded mode
2019-04-17 13:15:06 -04:00
Matthew Brown
01f005290e
Allow file path to be passed into methodExists
2019-04-17 00:17:49 -04:00
Brown
ff14f671b1
Add hopefully-more-portable method for evaluating method/property usage
2019-04-16 16:07:48 -04:00
Matthew Brown
21fd385eb4
Fix brackets
2019-04-12 20:30:28 -04:00
Brown
26e2de93c7
Prepare to enable paralellised use of --find-dead-code
...
References #1548
2019-04-12 18:28:07 -04:00
Matthew Brown
0da3623372
Prevent internal consumers of classExists from being penalised
2019-03-17 17:11:04 -04:00
Bruce Weirdan
51460e6078
Codebase::classExtends() now rejects unpopulated classes
...
This is done to prevent false negatives, when class storage hasn't been
populated yet.
Fixes vimeo/psalm#1387
2019-03-17 13:51:00 -04:00
Brown
bd372e93af
Add config flags for findUnusedVariables and findUnusedCode
2019-03-05 15:45:09 -05:00
Matthew Brown
92cba71a06
Add extra arg to return type call
2019-03-03 22:57:40 -05:00
Matthew Brown
3ad1abece4
Add generation of json artifacts
2019-02-24 01:33:25 -05:00