Matthew Brown
4dd0a2b775
Fix #3380 - allow comparisons between template param and empty array
2020-05-16 16:41:07 -04:00
Brown
8f57d0c738
Fix #3204 - normalise function ids where possible
2020-04-20 21:38:35 -04:00
Valentin Udaltsov
9b8e8ab964
Support non-empty-arrays in array_keys ( #3168 )
...
Closes #3160
2020-04-18 00:56:54 -04:00
Matthew Brown
aa29c7fc9e
Revert "Support non-empty-arrays in array_keys ( #3168 )" ( #3172 )
...
This reverts commit a280e57ecf
.
2020-04-17 16:52:08 -04:00
Valentin Udaltsov
a280e57ecf
Support non-empty-arrays in array_keys ( #3168 )
...
Closes #3160
2020-04-17 15:07:41 -04:00
Brown
a117c48bb2
Add back nuance to error messages for conflicting type bounds
2020-04-08 12:37:46 -04:00
Brown
067104e170
Fix #3084 - keep track of upper and lower bounds of inferred template types
2020-04-07 00:13:56 -04:00
Brown
387bc02e71
Fix #3082 - merge intersection types when replacing template types
2020-04-06 10:19:36 -04:00
Brown
aca84e6f96
Fix inconsistency in partial template matching
2020-04-05 18:40:25 -04:00
Brown
1bf1a6e46b
Accept partial match of template type
2020-04-04 17:14:33 -04:00
Matthew Brown
520db22929
We can infer this type now
2020-03-11 15:43:44 -04:00
Matthew Brown
1062591eec
Fix broken test
2020-03-11 13:44:08 -04:00
Matthew Brown
e0d555e203
Allow function names to passed in as strings for callable template resolution
2020-02-29 15:43:45 -05:00
Matthew Brown
1f19aed31b
Fix support for replacing mocked types in own classes
2020-02-27 21:36:03 -05:00
Brown
35c1670602
Fix #2875 - treat intersections more similarly than before
2020-02-27 18:42:15 -05:00
Matthew Brown
746f8d4973
Prevent returning named object where template return assumed
2020-02-24 23:14:16 -05:00
Brown
f4485cc529
Fix #2847 - use fully-qualified function name
2020-02-21 16:44:31 -05:00
Brown
b51863fc9b
Fix #2848 - allow casting templated types
2020-02-21 15:17:35 -05:00
Matthew Brown
9bdca3c706
Forbid array<mixed, ...>
2020-02-21 01:26:51 -05:00
Matthew Brown
00afcda5e0
Fix #2824 - allow unpacking of non-arrays with template params
2020-02-17 19:54:11 -05:00
Matthew Brown
8db4bc7691
Improve formatting of intersection error messages
...
Also reduce false positives on intersections of templates
2020-02-02 12:25:24 -05:00
Brown
216d9256a1
Allow templated array_map callable inference
...
Fixes #2719
2020-01-30 17:13:46 -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
Matthew Brown
f40b6625eb
Fix #2431 - allow null in template defaults
2019-12-13 21:40:09 -05:00
Matthew Brown
517aaac851
Fix #2432 - narrow template type after is_object check
2019-12-08 21:40:15 -05:00
Matthew Brown
d6a731be73
Fix #2441 - add error when @template type is missing
2019-12-08 21:19:29 -05:00
Matthew Brown
27c9aa4286
Fix code and test
2019-12-01 10:43:51 -05:00
Matthew Brown
f21150b8ad
Fix #2384 - fix resolution of @param-out template types
2019-12-01 10:40:53 -05:00
Matthew Brown
b1aae0d1a5
Fix more try/catch stuff
2019-11-12 00:52:10 -05:00
Brown
3d7b34e7f6
Fix #2273 - ensure all template params are bound
2019-11-07 11:03:41 -05:00
Brown
86b6801066
Fix #2294 - detect invalid callble due to __invoke
2019-11-07 09:39:24 -05:00
Matthew Brown
8f421dc0bb
Refactor template calculation out from Psalm\Type\Union
2019-11-03 21:27:40 -05: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
Brown
3f837a3493
Fix #2192 - allow static return value on templated object
2019-10-11 12:02:41 -04:00
Matthew Brown
c7600fde10
Fix #2217 - interpret callable self return type references properly
2019-10-09 07:40:42 -04:00
Brown
b5614d03f8
Add detection for unused function calls
2019-08-13 13:15:23 -04:00
Matthew Brown
18da84c713
Fix #1937 - allow proper reconciliation on templated values
2019-07-15 01:26:08 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Brown
1864d9a2be
Allow templated @var on return docblocks
2019-06-26 16:26:14 -04:00
Brown
16bf5f11e1
Fix #1845 - prevent string return when expecting template
2019-06-25 15:06:02 -04:00
Brown
6cb52d2d0e
Move strings that reference T::class
2019-06-25 14:15:58 -04:00
Brown
e5016a4ffc
Break out function class-string tests in a separate file
2019-06-25 14:13:00 -04:00
Brown
4f9c040a15
Broke apart some large test files
2019-06-25 13:00:06 -04:00