1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

72 Commits

Author SHA1 Message Date
orklah
8b98e645eb skipped tests 2021-10-20 23:37:52 +02:00
orklah
4866155b3a add test 2021-10-09 20:03:52 +02:00
Matt Brown
1195335078 Fix #5768 - call methods with proper params 2021-05-14 22:50:11 -04:00
Matt Brown
ed43c739e3 Prevent another unsafe template situation, skipping key-of tests for now 2021-05-05 01:06:53 -04:00
Matt Brown
ba90267ea7 Fix bad subtyping rule 2021-05-05 00:42:06 -04:00
AndrolGenhald
de5a031088
Improve @no-named-arguments support and variadics. (#5455)
* Improve @no-named-arguments support and variadics.

Handling of argument unpacking and variadics still needs a pretty big makeover, but this is a good start.

Fixes #5420
Improves #5453 (iterable works, array still causes issues)

* Remove unneeded imports.
2021-03-22 19:58:22 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys (fixes #5427). (#5428)
* Fix object-like array keys (fixes #5427).

* Fix incorrect return types for tests.

* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Matt Brown
d4841993b2 Fix #5279 - don’t convert get_class($templated) into dependent type 2021-02-25 18:43:04 -05:00
Matt Brown
6b53e79505 When there’s an irrecoverqable syntax error invalidate all issues in the file 2021-02-14 21:16:12 -05:00
Matt Brown
8834a54934 Fix #5219 - invalidate cache for changed params 2021-02-14 12:07:15 -05:00
Matt Brown
fa337375ae Fix #5198 - allow is_array check on templated 2021-02-12 12:32:24 -05:00
Matt Brown
e299e914f8 Fix #4958 - honour template as inheritance when comparing template types 2021-01-09 18:58:29 -05:00
Matt Brown
6ef0f2e63e Fix #4943
Prevent input types becoming part of the inferred generic params when a match is found
2021-01-09 18:08:02 -05:00
Matt Brown
2f7bf2a144 Bind lower bounds to upper bounds as well when no upper bound can be inferred
Ref #4485
2020-11-11 17:46:09 -05:00
Matt Brown
fce5c26600 Remove subpar test 2020-10-28 13:55:51 -04:00
Matt Brown
d27d86a84c Fix #4422 - be aware of nested template params 2020-10-27 10:01:17 -04:00
Matt Brown
14efde286f 4.x - refactor unused variable detection
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
00ad09816f Fix tests 2020-09-10 19:05:47 -04:00
Brown
9878613594 Refine iterable key after is_array check
Ref #4038
2020-08-26 11:00:38 -04:00
Brown
6ab3e732fb Fix #4038 - don’t remove null types unnecessarily in mixed union 2020-08-25 15:50:33 -04:00
Matthew Brown
5c20a5295e Improve solution to #3964 2020-08-16 13:03:30 -04:00
Matthew Brown
a356a43a51 Fix #3964 - prevent incorrect intersection of unions 2020-08-16 12:26:07 -04:00
Matthew Brown
6085e42fc1 Detect mismatching param names effectively 2020-08-10 09:58:43 -04:00
Brown
afce2dc66f Tighten up rules around instantiation a bit more 2020-08-06 10:18:55 -04:00
Brown
c0b0036109 Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
Brown
6419788a49 Remove false from template param as necessary
Fixes #3737
2020-07-03 01:07:50 -04:00
Brown
3da3d61270 Fix #3434 by removing extraneous call to simplifyType 2020-05-26 17:55:54 -04:00
Brown
bebfac0ab6 Fix #3426 - allow falsy reconciliation for templated params 2020-05-22 13:16:48 -04:00
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