1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 08:49:52 +01:00
Commit Graph

91 Commits

Author SHA1 Message Date
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
Matthew Brown
cdae79b9fe Fix unnecessary params in Psalm codebase 2019-02-23 11:31:33 -05:00
Bruce Weirdan
991fd90a12 Added tests for exposed methods 2019-02-21 08:43:57 -05:00
Matthew Brown
0e5ee1a811 Fix typo 2019-02-21 08:43:57 -05:00
Bruce Weirdan
adc5d24399 Added documentation for several exposed methods
Documented:
- isTypeContainedByType
- canTypeBeContainedByType
- getKeyValueParamsForTraversableObject
2019-02-21 08:43:57 -05:00
Bruce Weirdan
a0e040a462 Expose more internal methods through Codebase
- `bool Codebase::canTypeBeContainedByType(Union $input, Union $container)`
- `array{Union,Union} Codebase::getKeyValueParamsForTraversableObject(Atomic $type)`

For usage, see psalm/phpunit-psalm-plugin#15
2019-02-21 08:43:57 -05:00
Matthew Brown
81a5a24e15 Suppress PossiblyUnusedMethod 2019-02-18 15:56:31 -05:00
Bruce Weirdan
e87f500458 Added Psalm\Codebase::isTypeContainedByType() 2019-02-18 15:56:31 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00
Matthew Brown
17541b415f Fix #1191 - allow Psalm to check against different versions of PHP 2019-02-07 12:25:57 -05:00
Matthew Brown
0574e06a42 Remove 7.0-incompatible type 2019-01-27 18:31:40 -05:00
Matthew Brown
45cf35350c Add non-internal endpoint for parsing types 2019-01-27 17:26:32 -05:00
Brown
51c6621925 Add property lookup 2019-01-22 11:10:37 -05:00
Brown
2d22db4cb7 Clear up use of reloadFiles 2019-01-02 12:10:52 -05:00
Matthew Brown
947e3bf0f1 Fix crashes when analysing aliased class instances 2018-12-21 11:32:44 -05:00
Tyson Andre
6ab59209d6 Fix usage of substr_count($haystack, $needle)
Detected via a check that literals and variables occur in the most
typical order for a global function.
2018-11-21 13:59:22 -05:00
Brown
b5f0159cdf Add backup hover analysis when file isn’t analysed 2018-11-20 16:32:40 -05:00
Brown
ca602f8e17 Fix language server crash after editing trait method names 2018-11-20 15:51:47 -05:00
Brown
0254322bed Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals 2018-11-12 11:20:59 -05:00
Matthew Brown
9709263b8d Make many PropertyAnalyzer properties private 2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93 Change _checker to _analyzer 2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matthew Brown
9f2fe748e8 Improve handling of vars set in always-entered for/foreach/while loops 2018-11-10 16:10:59 -05:00
Brown
f2c013e45f Improve API for setting temporary file contents 2018-11-09 10:42:55 -05:00
Matthew Brown
7d12bfd2d1 Cache errors as well as info issues 2018-11-01 21:52:39 -04:00