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
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