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

131 Commits

Author SHA1 Message Date
8d0c1c62e8
Ensure all template parameters are specified in classes, interfaces, traits 2022-01-31 10:06:31 +01:00
orklah
1220320e0b
fix some iterator stubs (#6970)
* fix some iterator stubs

* fix iterators

* update stubs

* fix a test

* fixes

* fixes

* fix a test

* fix
2022-01-30 01:18:05 +01:00
orklah
7c8441baec
Merge pull request #7123 from AndrolGenhald/feature/942-type-annotate-class-constants
Support type annotations for class consts (fixes #942).
2022-01-25 20:54:40 +01:00
orklah
a7b72b865f remove TPositiveInt usage for TIntRange 2022-01-23 22:04:18 +01:00
AndrolGenhald
c18a155f77 Support type annotations for class consts (fixes #942). 2022-01-22 17:06:53 -06:00
Pete Walker
057a99c9f1
fix: Tests / minor bug 2022-01-22 00:00:45 +00:00
Matthew Brown
b49682a485 Simplify issue suppression in tests 2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys (#7386)
* Transformation that updates assertions

* Simplify transformation

* Ensure that all tests have keys

* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
Matthew Brown
b419c299e3
Use InvalidScalarArgument only when we can be sure PHP attempts coercion 2022-01-02 14:56:18 +02:00
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
ralila
8fb2e0f885 Handle some partials 2021-12-04 21:55:53 +01:00
02e293bc07
Improve test 2021-10-27 11:02:35 +02:00
9c59550e15
Fully fix recursive template parameter resolution 2021-10-27 10:58:33 +02:00
3f1fef1fce
Fix tests 2021-10-26 13:38:06 +02:00
6fe44b3374
Add tests 2021-10-26 13:26:36 +02:00
orklah
8b151f39c8 put back one of the errors 2021-10-09 22:09:48 +02:00
orklah
d7dfd87390 remove suppress on an old test 2021-10-09 21:04:06 +02:00
Matthew Brown
d12cf88e83 Add back supported for templated index assignment 2021-06-09 12:55:37 -04:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
Vincent Langlet
587b144f0e
Check for ParamName even for method with only one param (#5732)
* Check for ParamName even for method with only one param

* Fix tests
2021-05-08 19:33:48 -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
012dafad79 Fix #5383 - prevent unsound use of new static for generics 2021-04-10 13:16:19 -04:00
Matt Brown
9a714b759e Fix #5496 - ensure params extended in properties are properly fleshed out 2021-03-28 23:10:38 -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
04f3e29f94 Expand documentation method return type to ensure we’re giving a fair shot 2021-03-18 11:07:02 -04:00
Matt Brown
92c12d5a38 Separate out some nested template tests 2021-02-26 16:05:46 -05:00
Matt Brown
6fb7423c68 Fix #5211 - prevent infinite loop in template inference 2021-02-13 16:16:58 -05:00
Matt Brown
ad0b575080 Better fix for #5180 2021-02-08 23:31:49 -05:00
Matt Brown
9b8fdf154d Revert "Allow refinement of $this properties based on subclass"
This reverts commit 1d5d2403e2.
2021-02-08 22:50:50 -05:00
Matt Brown
1d5d2403e2 Allow refinement of $this properties based on subclass
Fixes #5180
2021-02-08 22:46:32 -05:00
Matt Brown
0eed186edf Fix #5140 - always replace closure return types, whether or not a matching input type is present 2021-02-01 21:40:30 -05:00
Matt Brown
c1d868f950 Fix #5127 - delay transformation of base classes based on inheritance until later 2021-01-31 12:33:07 -05:00
Matthew Brown
2898e556e4 Fix test 2020-12-29 16:52:59 +00:00
Matt Brown
fbaaf05f48 Fix psl inheritance stuff cc @azjezz 2020-12-13 16:58:03 -05:00
Matt Brown
e6dad6e65f Be smarter when choosing inherited param types
Ref #4803
2020-12-10 00:15:37 -05:00
Matt Brown
1e0bcc1876 Fix #4803 - always derive method params the same way 2020-12-08 11:27:51 -05:00
Matt Brown
fb88145780 Fix #4767 - rescan directly-affected class-interface relationships 2020-12-04 01:19:51 -05:00
Matt Brown
15a5bd5e29 Simplify storage and retrieval of extended template params 2020-11-29 15:05:32 -05:00
Matt Brown
de1fa03f77 Fix template type selection 2020-11-28 09:53:11 -05:00
Matt Brown
13b83e6132 Fix #4545 - allow intersections in more places 2020-11-13 09:43:30 -05:00
Matt Brown
2992cc73c2 Split out trait template tests 2020-11-13 08:59:55 -05:00
Matt Brown
3dd185e395 Fix #4537 - use more rigorous inerhitance for return and param types 2020-11-12 13:54:27 -05:00
Matt Brown
b7551e712a Use better way to determine which signture to use
Fixes #4524
2020-11-11 19:22:23 -05:00
Matt Brown
a8d7248c31 Fix #4524 - do better template param inheritance 2020-11-11 13:25:17 -05:00
Matt Brown
67554dd017 Fix #4453 - sanitise @extends types before attempting to parse 2020-10-30 15:08:23 -04:00
Brown
8f8dbfbd72 Fix #4122 - detect yield in function arguments 2020-09-13 17:13:26 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Brown
6e1218065d Preserve intersections when expanding templated types
Fixes #4043
2020-08-25 14:12:57 -04:00