1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
Commit Graph

53 Commits

Author SHA1 Message Date
Josh Di Fabio
d37cddea27 FileProvider: Consider file open if temp changes
The VS Code LSP client does not always send didOpen messages when a file
is being edited. This causes code completion requests to fail because the
completion request refers to files which are not 'open' according to
FileProvider.

This commit changes FileProvider so that a file is considered 'open' if it is
being modified, even if no didOpen message was received from the LSP
client.
2019-05-17 11:27:45 -04:00
Brown
ebe97c871e Make tests much faster 2019-05-17 11:22:34 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Ramon Bakker
6a473f6e71 Fix isset check
Check if index exists in the array with open files, instead of checking
if index exists in the array with temporary files.
2019-05-09 08:31:16 -04:00
Brown
1db0e38b08 Invalidate cache when Psalm version changes 2019-05-08 11:58:34 -04:00
Brown
b6e9fba8e6 Track method param uses between diff runs 2019-04-29 17:29:38 -04:00
Matthew Brown
b4f24d1fa6 Fix a couple of tests, and track file references to classes 2019-04-28 12:59:36 -04:00
Matthew Brown
2ae0f92960 Store files-referencing-classes between runs to enable unreferenced code --diff mode 2019-04-28 12:36:24 -04:00
Matthew Brown
e08944cae0 Allow diff mode with --find-dead-code 2019-04-27 17:38:24 -04:00
Brown
ff14f671b1 Add hopefully-more-portable method for evaluating method/property usage 2019-04-16 16:07:48 -04:00
Matthew Brown
d145f17782 Fix #1548 - allow parallel execution with --find-dead-code 2019-04-13 15:38:09 -04:00
Brown
26e2de93c7 Prepare to enable paralellised use of --find-dead-code
References #1548
2019-04-12 18:28:07 -04:00
Brown
be5a262deb Add better handling for non-edge-case function calls 2019-04-11 14:53:21 -04:00
Brown
1a33b25264 Fix #1536 - prevent fatal error when filtering null array 2019-04-09 17:22:30 -04:00
Brown
115b68dc70 Fix #1526 - add a proper check for file storage 2019-04-03 17:41:33 -04:00
Brown
21b1c04c1d Fix #1526 - ignore files if they weren’t picked up in scanning step 2019-04-03 10:43:48 -04:00
Brown
1ab6345bac Fix treatment of PDOStatement::setFetchMode
Fixes #1496
2019-03-29 13:26:13 -04:00
Brown
f82a55d836 Fix #1512 - check args to mktime are all ints 2019-03-29 10:46:48 -04:00
Matthew Brown
ee56419fd6 Improve accuracy and durability of mixed counts 2019-03-23 09:50:47 -04:00
Matthew Brown
f0ddc6f3bc Fix array_reverse implementation 2019-03-17 18:14:30 -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
Matthew Brown
01d6caf6a2 Catch negated instanceof bugs 2019-03-16 12:34:48 -04:00
Brown
441d3c4693 Fix #1470 - array_reverse should preserve count 2019-03-15 16:39:31 -04:00
Brown
85f34f2aca Add defining class and increas string length 2019-03-12 12:58:04 -04:00
Brown
e5f7a5a4bc Coerce class string types together 2019-03-08 17:35:09 -05:00
Brown
5beb26659e Add special type for SQL select strings for plugins to consume 2019-03-07 14:56:18 -05:00
Tyson Andre
6f7295ed13 Remove unused use statements 2019-03-03 22:22:36 -05:00
Matthew Brown
317f790bde
New plugin hooks (#1405)
* Add a bunch of new hooks

* Add more integrations

* Add some broken tests

* Add more things

* Fix remaining interfaces

* Suppress proper issue

* UndefinedMethod should not stop analysis

* Add handlers for two custom method return types
2019-03-01 08:57:10 -05:00
Matthew Brown
ee942b3c02 Fix return type 2019-03-01 00:06:35 -05:00
Brown
815bf845dc Improve handling of method/function return types 2019-02-27 17:06:44 -05:00
Matthew Brown
cdae79b9fe Fix unnecessary params in Psalm codebase 2019-02-23 11:31:33 -05:00
Matthew Brown
6b045236e0 Use appearing method for array lookup 2019-02-20 02:41:59 -05:00
Matthew Brown
cd2eb3edb9 Fix #1361 - flesh out array map return type before using 2019-02-19 01:25:36 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00
Matthew Brown
2ef82d785f Improve signature of FunctionReturnTypeProvider to omit internal things 2019-02-16 15:29:54 -05:00
Matthew Brown
0739d017ac Use information from .phpstorm.meta.php files in stubs 2019-02-16 11:16:52 -05:00
Matthew Brown
d5420a7708 Suppress PossiblyUnusedParam for PHP 7.0 2019-02-15 18:50:23 -05:00
Matthew Brown
0c9c8c204c Suppress UndefinedMethod for Php 7.0 Psalm check 2019-02-15 18:41:30 -05:00
Matthew Brown
149d7cab1c Add PHP 7.0-compatible closure creation 2019-02-15 18:33:29 -05:00
Matthew Brown
d76459e138 Move to a PHPStan-like return type provider class model 2019-02-15 18:00:40 -05:00
Matthew Brown
90dc39c296 Don’t preserve old storages when receiving worker data
This bug was found when running Psalm in threaded execution mode
2019-01-15 23:24:29 -05:00
Brown
f108badd03 Fix #1067 - add support for @template-extends 2019-01-10 16:59:44 -05:00
Brown
974476dc87 Fix var used to assert length 2018-12-20 17:34:56 -05:00
Brown
abdf646050 Only diff files if lengths are not very different 2018-12-20 17:33:35 -05:00
Matthew Brown
aee5639a4c Remove @internal annotation from FileProvider because PHPUnit 6 can’t deal 2018-12-01 19:06:24 -05:00
Matthew Brown
b32000fa05 Fix #689 - add checks for @internal annotations 2018-12-01 18:37:49 -05:00
Brown
f5e788ec1f Increase limits of literal strings to 50 characters 2018-11-27 17:48:23 -05:00
Matthew Brown
f35a550774 Remove redundant clause 2018-11-20 22:24:53 -05:00
Matthew Brown
740aa895e9 Fix #1074 - allow switching from Phar analysis to regular analysis 2018-11-20 22:21:00 -05:00
Brown
b5f0159cdf Add backup hover analysis when file isn’t analysed 2018-11-20 16:32:40 -05:00