Brown
111303d913
Add non-empty-lowercase-string type
2020-05-15 10:18:05 -04:00
Brown
8f57d0c738
Fix #3204 - normalise function ids where possible
2020-04-20 21:38:35 -04:00
Bruce Weirdan
5be4cc2582
Expose queueClassLikeForScanning ( #3070 )
2020-04-05 17:25:47 -04:00
Brown
1c8581f4db
Add more fields to API existence checks
2020-03-28 21:39:44 -04:00
Brown
4ced26bec2
Fix #3024 - replay errors in --diff --diff-methods mode
2020-03-26 14:22:06 -04:00
Brown
971ae50bea
Do prep work for #3024 - improve handling of absent class references
2020-03-26 12:35:27 -04:00
Matthew Brown
9556e9ad69
Disable enclosing method/function return type inference
...
cc @ragboyjr – this makes Psalm unstable, as method return types cannot change midway through analysis (as it means results would be dependent on file analysis order)
2020-03-16 11:45:49 -04:00
Matthew Brown
43189b3d55
Allow types to be traversed
2020-03-14 23:54:51 -04:00
RJ Garcia
a220d08d9f
Refactor Codebase.php to use MethodIdentifier::wrap ( #2972 )
...
Signed-off-by: RJ Garcia <rj@bighead.net>
2020-03-14 19:10:20 -04:00
RJ Garcia
2de3e27f10
Initial inferred Closure Returns ( #2945 )
...
- Added detection for when we can infer
closure types from parent fn return types
- Implemented functionality for infering types of
returned closures
- Added ability to infer type of return from typed
closures
- Added a new getFunctionLikeStorage method in
Codebase to support easily getting a function
despite being a method, closure, or function
- Added some utilities to the MethodIdentifier
to facilitate creating MethodIdentifier's from
string method references
Closes #2896
Signed-off-by: RJ Garcia <rj@bighead.net>
2020-03-14 14:51:43 -04:00
Matthew Brown
c0c878cc9d
Don’t cache all traits
2020-03-02 22:27:54 -05:00
Matthew Brown
653353709a
Use MethodIdentifier object instead of string
2020-02-14 20:54:26 -05:00
Matthew Brown
bd7f342491
Add constant definitions
2020-01-08 23:48:42 -05:00
Matthew Brown
9fa2db1b6c
Move Union::getTypes to Union::getAtomicTypes
2020-01-04 12:20:26 -05:00
Brown
fb48db9163
Remove unused property
2020-01-03 13:10:24 -05:00
Matthew Brown
55c2f7faa2
Fix #2508 - don’t replace templated types with generic ones inside own function
2019-12-28 18:38:02 -05:00
Brown
0bcb7863f3
Use better system for storing inferred types and assertions
2019-11-25 11:44:54 -05:00
Matthew Brown
94d4b876ba
Fix #2177 - mark variables in try block as potentially undefined
2019-11-09 12:25:30 -05:00
Brown
3cf16c8ef3
Add back arg
2019-11-07 09:56:27 -05:00
Brown
4f9cf54005
Use unaliased name for external hook
2019-11-04 10:13:12 -05:00
Brown
23fcbec584
Add a few more list types
2019-10-08 19:06:16 -04:00
Matthew Brown
0b4981f01b
Fix #1551 - do better at inferring class constant types
2019-09-14 14:26:31 -04:00
Matthew Brown
2a5e0d8f39
Fix #1444 - track unused suppressions
2019-08-18 14:27:50 -04:00
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