Matthew Brown
982fe627e0
Fix #2515 - allow chained assertions on @psalm-mutation-free methods
2019-12-27 16:44:55 -05:00
Matthew Brown
068afa09d3
Add very basic implementation for class-string-map
...
Fixes #1969
2019-12-27 12:49:28 -05:00
Matthew Brown
b78f273ccf
Improve handling of template params a smidge
2019-12-27 11:49:44 -05:00
Matthew Brown
4c8730c5a3
Improve handling of unset array, ensuring that keys don’t persevere
2019-12-22 01:42:39 +00:00
Matthew Brown
af28d650f3
Fix #2408 - existing offsets checked with isset should be valid
2019-12-18 23:48:25 +00:00
Matthew Brown
bdbc758ddc
Fix #2475 - allow iterable covariance
2019-12-16 07:16:35 -05:00
Brown
2469f04715
Improve reconciliation of arrays with constant offsets
2019-12-13 17:17:14 -05:00
Brown
6d02aa86e8
Reconcile string emptiness a bit better
2019-12-13 15:51:54 -05:00
Matthew Brown
8f25183784
Fix #2459 - don’t add assertions to parent context unnecessarily
2019-12-12 00:37:00 -05:00
Brown
05783eb616
Find issues with impossible property values
2019-12-11 17:08:02 -05:00
Brown
612f74f481
Clean up static property reconciliation
2019-12-11 15:05:09 -05:00
Brown
6b56a0239d
Improve handling of assertions on static properties
2019-12-11 14:06:09 -05:00
Brown
9d22f56560
Fix #2443 - templates are not valid PHPDoc
2019-12-10 14:03:51 -05:00
Matthew Brown
8494f02008
Fix template handling when templating inside templated class
2019-12-10 00:50:36 -05:00
Brown
aaffdbc79f
Add support for non-empty scalar
...
Ref #2449
2019-12-09 17:06:10 -05:00
Brown
40bdc219ff
Add more info for too many params error
2019-12-09 10:31:00 -05:00
Matthew Brown
02fbf12337
Only warn about clauses in the currently-scanned conditional
2019-12-08 16:35:56 -05:00
Matthew Brown
c9f43782fd
Fix mixed method issues after defining new type
2019-12-08 10:17:40 -05:00
Matthew Brown
df395944f8
Change how $changed_var_ids is communicated
2019-12-07 01:23:35 -05:00
Brown
3a5bb9db9a
Add slash
2019-12-04 12:29:06 -05:00
Brown
e1dd22ef6c
Allow static::class to be used in array assertions
2019-12-04 12:23:26 -05:00
Brown
d5f5c742ce
Fix #2411 - allow use of covariant params in array returned value
2019-12-04 10:49:07 -05:00
Matthew Brown
b1e8c386fd
Remove unused function
2019-11-30 12:39:17 -05:00
Matthew Brown
a8c2b7a525
Fix #2400 - string should subsume class-string
2019-11-30 12:32:31 -05:00
Matthew Brown
c65540a323
Fix some templating issues in CoreGenericClasses
2019-11-30 00:27:07 -05:00
Matthew Brown
ccd6718582
Fix templating of objects with properties
2019-11-29 22:57:45 -05:00
Matthew Brown
1e3ecb5fd0
Fix #2387 - ensure docblock return types are checked
2019-11-29 11:20:37 -05:00
Brown
532e2d64be
Allow using covariant template in mutation-free context
2019-11-26 11:35:03 -05:00
Brown
0bcb7863f3
Use better system for storing inferred types and assertions
2019-11-25 11:44:54 -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
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
Brown
4747ba709a
Migrate more things
2019-11-15 15:34:25 -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
Matthew Brown
975ff9250b
Fix #2328 - don’t crash on unexpected divider
2019-11-13 01:13:29 -05:00
Matthew Brown
2fc7f5fdf7
Fix #1830 - infer key type after array_key_exists check
2019-11-10 14:23:53 -05:00
Brown
ac6256e645
Fix #2312 , improve understanding of template replacement
2019-11-08 11:56:41 -05:00
Brown
3d7b34e7f6
Fix #2273 - ensure all template params are bound
2019-11-07 11:03:41 -05:00
Brown
a8ed6ba9c4
Fix #2308 - prevent specialisation from bound params
2019-11-06 11:20:51 -05:00
Brown
e7330afe8b
Fix #2295 - support special case of array_shift on known offset type
2019-11-04 09:21:13 -05:00
Matthew Brown
8f421dc0bb
Refactor template calculation out from Psalm\Type\Union
2019-11-03 21:27:40 -05:00
Matthew Brown
a82e35a59f
Fix #2291 - extended covariant template param types should be treated as covariant
2019-11-01 18:25:07 +01:00
Matthew Brown
bab7e46983
Fix #2281 - allow lists to accept list types
2019-11-01 13:35:16 +00:00
Matthew Brown
8d7cdeb8ec
Fix #2275 - allow extended templated types to bypass mixed type coercion rules
2019-10-29 10:07:34 +00:00
Brown
8876499ddd
Fix #2252 - allow destructuring of ArrayAccess objects
2019-10-22 11:17:42 -04:00
Matthew Brown
1d6ca9bd7d
Allow callable-array type in docblocks
2019-10-20 15:33:57 -04:00
lhchavez
216f991b0c
Normalize stringified type names ( #2239 )
...
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Matthew Brown
7b522af169
Provide necessary typehint
2019-10-15 20:41:06 -04:00
Matthew Brown
0556f28a9f
Fix #2224 - make sure literal strings are put into appropriate arrays when templating
2019-10-10 23:38:57 -04:00