1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
Commit Graph

5508 Commits

Author SHA1 Message Date
Matthew Brown
d1c4c85f97 Support covariant return types & contravariant param types
Fixes #2102 and #2264
2019-11-27 00:19:36 -05:00
Matthew Brown
2c08321603 Ignore union types for now 2019-11-27 00:00:46 -05:00
Matthew Brown
d1fbd1fa26 Add working arrow-functions implementation 2019-11-26 23:52:26 -05:00
Brown
90cb3f4472 Speed up accessing node data
Ref #1837
2019-11-26 17:48:47 -05:00
Brown
f97a8f0d5b Use more accurate way to determine list size 2019-11-26 16:34:19 -05:00
Pavel Batečko
4e594e0a65 Improve array function list handling (#2377)
* array_column() returns a list unless the 3rd arg is passed

* array_pad() return type provider

* array_chunk() return type provider

* array_map() preserve list types
2019-11-26 14:48:49 -05:00
Brown
2f02da62c1 Add note to future self 2019-11-26 14:47:07 -05:00
Lars Strojny
9d32273029 Fix typo in InfiniteIterator type definition (#2378) 2019-11-26 14:20:40 -05:00
Brown
7ccd73b5e3 Fix redundant condition 2019-11-26 12:32:07 -05:00
Brown
842b2a53df Refine lists with object-like array types
Fixes #2357
2019-11-26 12:22:28 -05:00
Brown
532e2d64be Allow using covariant template in mutation-free context 2019-11-26 11:35:03 -05:00
Brown
a91d2ef572 Add space 2019-11-25 16:55:44 -05:00
Brown
736ccd84cd Allow more generic iterable when yielding
Fixes #2353
2019-11-25 16:12:44 -05:00
Brown
0f94bebe4c Fix dupe key 2019-11-25 16:00:16 -05:00
Brown
5626058eff Fix #2374 - refine error-suppressed output a little better 2019-11-25 15:38:54 -05:00
Brown
1f07ea7ee7 Tighten up Psalm’s inference 2019-11-25 15:20:31 -05:00
Brown
c60cafbf98 Ignore issues in spl_object_id 2019-11-25 14:01:33 -05:00
Brown
95f7a389e1 Remove dud file 2019-11-25 13:09:06 -05:00
Brown
96c4eeec98 When calling magic method clone node info 2019-11-25 13:08:38 -05:00
Brown
ae10e6c130 Add polyfill for spl_object_id 2019-11-25 12:50:48 -05:00
Brown
1add42b691 Fix switch handling 2019-11-25 11:51:34 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Takefumi Katsuren
da489d4b27 imagepng accepts resource at Argument 2 (#2373) 2019-11-24 20:15:05 -05:00
LeSuisse
edeb37207f Allow usage of symfony/console v5 (#2366) 2019-11-22 08:56:40 -05:00
Tyson Andre
6bc152e2da Use the long progress bar for CI logs (#2364) 2019-11-22 08:56:18 -05:00
Brown
cff354ef28 Fix test 2019-11-21 16:51:23 -05:00
Brown
78a3894403 Fix Psalm errors 2019-11-21 11:03:18 -05:00
Brown
06653f6322 Fix #2362 - support single value type in docblocks 2019-11-21 10:44:24 -05:00
Matthew Brown
4c2f7ad8db Add slash 2019-11-21 09:06:19 -05:00
Matthew Brown
2b1b0f6c34 Return 0 2019-11-21 09:02:56 -05:00
Matthew Brown
3d9c94e29a Fix #2363 - catch possible class not found errors when getting method 2019-11-21 08:56:47 -05:00
Bruce Weirdan
c50a17d415 Scan shape properties (#2359)
This prevents crashes when built-in classes are referenced by shape
properties.

Fixes vimeo/psalm#2331
2019-11-18 19:01:12 -05:00
Brown
81f513bb4c Fix #2358 - always analyse new XXX(...) in unknown method calls 2019-11-18 16:14:21 -05:00
Matthew Brown
e76beffa78 Fix #2355 - don’t remove used variables 2019-11-17 14:53:08 -05:00
Matthew Brown
dade56e4e1 Fix #2354 - add option to match documentation 2019-11-17 14:49:28 -05:00
Tyson Andre
ecf3abc396 Fix redundant condition (#2338)
TGenericObject is always a TNamedObject
2019-11-17 14:29:38 -05:00
Matthew Brown
2369bac943 Preserve self refs where possible 2019-11-16 19:59:08 -05:00
Matthew Brown
7d7d4dd926 Fix style stuff 2019-11-15 21:47:53 -05:00
Brown
55bf6a2db3 Migrate static return types 2019-11-15 16:50:43 -05:00
Brown
4747ba709a Migrate more things 2019-11-15 15:34:25 -05:00
Brown
5e17a9af10 Fix #2348 - ensure all functions and methods return some type 2019-11-14 14:44:29 -05:00
Brown
b3a15e8016 Fix #2349 - allow suppression of InvalidReturnType for no-return 2019-11-14 14:33:07 -05:00
Brown
d5b90f6887 Fix #2333 - don’t create array after empty check 2019-11-14 14:23:33 -05:00
Brown
8777c952c8 Fix #2330 - allow empty checks against numeric 2019-11-14 13:31:50 -05:00
Brown
09aafa40c0 No exception when file has issues 2019-11-14 12:54:35 -05:00
Brown
738ce4f850 Fix re-added function storage removal 2019-11-14 12:17:17 -05:00
Brown
b693b726c7 Improve handling of default extended params 2019-11-14 12:12:09 -05:00
Brown
70b8df268d Fix template covariance calculation, use container covariance not inputs 2019-11-14 11:43:49 -05:00
Brown
23c37f829d Move covariant tests into their own place 2019-11-14 11:42:16 -05:00
Brown
939be92f29 Fix stubbing in end-to-end tests 2019-11-14 11:03:41 -05:00