1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

5755 Commits

Author SHA1 Message Date
Matthew Brown
8c89760ff3 Use more accurate type for large arraya
Fixes #2690
2020-01-25 10:38:23 -05:00
Brown
c3a989f6a8 Fix bad var 2020-01-24 15:44:18 -05:00
Brown
c09f97ed6e Fix #2691 - allow list to be a callable maybe 2020-01-24 15:09:06 -05:00
Brown
38e9e8ba87 Register methods as used 2020-01-24 14:53:32 -05:00
Brown
548c9f7e65 Remove unused var 2020-01-24 14:09:25 -05:00
Brown
9f077f5aec Fix formatting 2020-01-24 14:08:01 -05:00
Brown
53b0650c6c Fix #2688 - foreach loop evaluation should allow changing loop var 2020-01-24 13:55:30 -05:00
Brown
faf6afdce8 Support call_user_func evaluation
Fixes #726
2020-01-24 13:34:50 -05:00
orklah
ef07e55deb add list<> notation in stubs (#2675)
* add list<> notation in stubs

* change phpdoc to be compatible with expected list<>

* change interface phpdoc to be compatible with expected list<>

* revert array_chunk => special case to handle with preserve keys.

* change array_chunk return to match both behaviour

* revert list<> notation in parameters where not required
2020-01-24 13:17:36 -05:00
Brown
dbdf7473f4 Fix abstract trait method implementation errors when using self 2020-01-24 11:15:35 -05:00
Brown
34d73e7243 Fix #2685 - always evaluate $a++ in unknown call 2020-01-24 10:32:28 -05:00
Matthew Brown
3af48347a9 Bind template params for IteratorIterator 2020-01-24 09:18:31 -05:00
Matthew Brown
efd46b35c5 Fix signatures 2020-01-24 09:10:42 -05:00
Matthew Brown
c893bd6a6b Add IteratorIterator generics 2020-01-24 08:58:52 -05:00
Matthew Brown
c87b19eeb0 Fix #2681 - no error after empty check on literal value 2020-01-23 22:26:49 -05:00
Brown
0ffb833bf3 Fix #2677 - use better assertion for null coalesce 2020-01-23 14:52:35 -05:00
Brown
0f659d996d Add documentation for new issue 2020-01-23 14:33:07 -05:00
Brown
da43b8188f Fix #2632 - detect invalid by-ref assignments in pure functions 2020-01-23 14:21:34 -05:00
Brown
0ac20e76c4 Fix #2631 - evaluate purity of uasort closure 2020-01-23 13:49:15 -05:00
Brown
311164f5ee Fix #2679 - session_start is impure 2020-01-23 10:26:11 -05:00
Matthew Brown
fa65ab8168 Add support for Github Actions output
Fixes #2678
2020-01-23 07:14:48 -05:00
SignpostMarv
dc80880a80 check if phpstorm meta path is a file or directory (#2643)
* check if phpstorm meta path is a file or directory, making a note if it was a directory, re: #2640

* import is_file()

* overcautiously glob into meta directory
2020-01-22 11:06:06 -05:00
Brown
e68ca6a20b Fix #2661 - catch invalid array_push on property 2020-01-22 09:57:59 -05:00
Matthew Brown
947765c1c6 Improve count checks slightly 2020-01-22 07:51:24 -05:00
Ben Davies
5139d61171 remove unnecessary loops (#2671) 2020-01-22 07:42:00 -05:00
Matthew Brown
d4ceabc174 Fix error baseline test 2020-01-21 21:22:38 -05:00
Matthew Brown
8202af957d Index issues by file to reduce some lookups 2020-01-21 21:07:44 -05:00
Brown
0132b3789b Fix #2665 - warn about abstract class interface inheritance issues 2020-01-21 11:46:51 -05:00
Brown
a2e1dfd64e Fix #2667 - don’t check inherited signature return types for accuracy 2020-01-21 11:07:44 -05:00
Brown
36f5c51f01 Allow unpacking of list args with known elements 2020-01-21 10:13:37 -05:00
Matthew Brown
504de0a9ce Catch more UnanalyzedFileExceptions to prevent LSP crash
Fixes #2633
2020-01-20 23:27:56 -05:00
orklah
f2802b6862 fix typo (#2663) 2020-01-20 23:19:48 -05:00
Scott Arciszewski
dbb630ec91 Allow Psalm to be installed on PHP 8 (#2660)
PHP 8 won't be released until later this year, but it'd be nice to be able to install Psalm without Composer complaining loudly.
2020-01-17 18:11:44 -05:00
Matthew Brown
db7b537bd1 Fix missing class 2020-01-17 13:19:57 -05:00
Matthew Brown
8ccd4860e3 fclose should treat resource as passed-by-reference 2020-01-17 13:12:00 -05:00
Matthew Brown
c9d88b6e62 Remove lines 2020-01-17 12:13:29 -05:00
Matthew Brown
1c8af2fdc7 Fix #2658 - catch exceptions thrown inside catch 2020-01-17 12:05:37 -05:00
Matthew Brown
7f093ca8ed Fix #2626 - allow assertions on resource types
Also fixes #2266
2020-01-17 11:55:16 -05:00
Matthew Brown
1697115861 Only set from docblock if not mixed 2020-01-17 10:34:13 -05:00
Matthew Brown
a840743015 Fix #2625 - set template as type from docblock 2020-01-17 10:27:00 -05:00
Matthew Brown
b582c49f51 Fix #2645 - add workarounds for some edgecases 2020-01-17 10:25:05 -05:00
Matthew Brown
2c48d42904 Allow destructuring of callable array
Fixes #2653
2020-01-17 10:02:58 -05:00
Matthew Brown
471d7610f0 Fix #2644 - improve type inference of autoloaded constants 2020-01-17 09:52:43 -05:00
Matthew Brown
24e1d5446c Fix #2642 - merging two explicit lists is still a list 2020-01-17 09:31:08 -05:00
Matthew Brown
adf230e873 Fix #2636 - allow non-empty-list in assert annotation 2020-01-17 09:06:34 -05:00
Alexander Wühr
f9560009ca Allow false as \PDO::fetch return type (#2647) 2020-01-17 08:48:08 -05:00
HenkPoley
72b5b22474 Mention how to annotate psalm specific annotations (#2648)
* Mention how to annotate psalm specific annotations

Might be nice to mention how to annotate psalm specific annotations, without trampling over PhpDoc annotations.

* Fix key type

Co-authored-by: Matthew Brown <github@muglug.com>
2020-01-17 08:47:21 -05:00
Matthew Brown
c50fa27025 Identify trait method access level violations as less serious 2020-01-17 00:28:08 -05:00
Matthew Brown
be6cd0f8c6 Fix generation of files in non-psr directory 2020-01-16 23:24:53 -05:00
Matthew Brown
257ebfd205 Improve trait method mismatch failure rules 2020-01-16 22:36:30 -05:00