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

13416 Commits

Author SHA1 Message Date
558239ecb0 cs-fix 2023-04-19 11:39:44 +02:00
19fab7a805 Fix comparison of unions of multiple callables 2023-04-19 11:37:04 +02:00
orklah
958eb5ae07
Merge pull request #9673 from whizsid/array_splice_multi_literal
Fixed crash issue when using multiple literals for array_splice
2023-04-18 22:06:06 +02:00
WhizSid
782735e8b2 Fixed crash issue when using multiple literals for array_splice 2023-04-19 00:38:35 +05:30
b35c3c41b8 Avoid verbose opcache logging 2023-04-18 13:53:32 +02:00
orklah
e2957a1631
Merge pull request #9664 from klimick/named-object-to-anonymous-object-coercion
Support anonymous object template replacement
2023-04-17 22:58:17 +02:00
adrew
aa3b2f2e1d Test anonymous object template replacement 2023-04-17 23:18:03 +03:00
adrew
6614767d76 Add KeyedArrayComparator::coerceToObjectWithProperties 2023-04-17 23:18:03 +03:00
adrew
ee0395247f Don't expand template for property fetch on TObjectWithProperties 2023-04-17 23:18:03 +03:00
andrew
dcd4e34ee6 Support anonymous object template replacement 2023-04-17 23:18:03 +03:00
orklah
4cba3c0507
Merge pull request #9663 from lptn/stream_context_get_params-array-shape
Specify array share for `stream_context_get_params` return value
2023-04-17 16:34:57 +02:00
Alies Lapatsin
7dc9a2dd50 Specify array share for stream_context_get_params return value 2023-04-17 16:11:20 +02:00
orklah
542d627994
Merge pull request #9393 from ygottschalk/fix/9373-using-enum-property-as-const-array-key
Fix/9373 using enum property as const array key
2023-04-17 12:56:42 +02:00
orklah
4bc226ed52
Merge pull request #9660 from klimick/fix-iterable-template-replacement
Fix iterable template replacement
2023-04-17 10:47:38 +02:00
andrew
b0e5df570d Fix iterable template replacement 2023-04-17 11:03:39 +03:00
orklah
a9bc87e729
Merge pull request #9656 from boesing/bugfix/issue-8981
(re-)implement object-shape assertions
2023-04-16 21:17:53 +02:00
orklah
6c7db9e0ec
Merge pull request #9655 from boesing/bugfix/issue-9145
Provide support for templated `value-of` enum values
2023-04-16 21:15:59 +02:00
orklah
24dc5d49b2
Merge pull request #9638 from boesing/bugfix/intersection-type-type-alias
Allow to intersect type alias with non-type-aliases
2023-04-16 21:14:21 +02:00
orklah
2a6d9a8785
Merge pull request #9658 from klimick/fix-list-template-replacement
Fix list<T> template replacement
2023-04-16 21:11:58 +02:00
adrew
f0153721a4 Fix list template replacement 2023-04-15 18:46:22 +03:00
Maximilian Bösing
66afbb1c33
feature: (re-)implement object-shape assertions
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 02:36:10 +02:00
Maximilian Bösing
ad5631497d
feature: provide support for templated value-of enum values
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 00:38:12 +02:00
Maximilian Bösing
26e201d28f
refactor: intersect keyed arrays the same way as in early return
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-14 22:19:01 +02:00
Maximilian Bösing
07fcf5399c
qa: mark TTypeAlias#extra_types and TTypeAlias#setIntersectionTypes as deprecated
Due to the way how this patch modifies the type alias handling, intersection types of aliases are directly expanded and thus, the referencing types are being used rather than intersecting aliases.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-14 22:16:12 +02:00
orklah
3e50f68794
Merge pull request #9623 from klimick/contextual-inference-for-const-callable
Contextual inference for const callable
2023-04-14 16:22:53 +02:00
andrew
1f282fe7ba Fix ClassTemplateTest.templateStaticWithParam test 2023-04-14 15:00:03 +03:00
orklah
6834f5dca1
Merge pull request #9651 from tuqqu/array-flip-non-empty-fix
Fix `array_flip` to preserve non-empty array type
2023-04-13 22:54:12 +02:00
tuqqu
d3a21acc24 Fix array_flip to preserve non-empty array type 2023-04-13 22:19:44 +02:00
orklah
cee88f2c4b
Merge pull request #9643 from whizsid/array_splice
Fixed non empty arg issue in array_splice function
2023-04-13 19:24:16 +02:00
WhizSid
73a0803282 Revert using ImpureMethodCall 2023-04-13 21:31:44 +05:30
WhizSid
f85c34a803 Supress the psalm error 2023-04-13 15:48:27 +05:30
WhizSid
02f8f11736 Handle empty array possibilities from array_splice 2023-04-13 14:37:09 +05:30
orklah
cb6508e63c
Merge pull request #9647 from tuqqu/match-branch-flattening
Flatten `match` arm conditions to check conditions independently
2023-04-13 10:52:11 +02:00
orklah
eb83938a2d
Merge pull request #9646 from SenseException/iteratoriterator-construct
fix: add missing constructor parameter to IteratorIterator
2023-04-13 10:45:11 +02:00
tuqqu
ed2285f50a Flatten match arm conditions to check conditions independently 2023-04-13 01:30:14 +02:00
Claudio Zizza
4ec735e696
fix: add missing constructor parameter to IteratorIterator
The second parameter exist since PHP 5.1 and wasn't present in the docs before.
Even reflection wasn't showing this parameter until 8.0.
2023-04-13 00:14:26 +02:00
WhizSid
9e5266d6fe Add issue snippet 2023-04-13 01:15:09 +05:30
WhizSid
ae67589463 Fixed CI 2023-04-13 01:14:49 +05:30
WhizSid
b19c263fe5 Fixed non empty arg issue in array_splice function 2023-04-13 00:34:29 +05:30
Maximilian Bösing
c3f91992f1
bugfix: ensure object and arrays are not intersectable
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-12 10:21:32 +02:00
Maximilian Bösing
1071257245
refactor: resolve TTypeAlias in intersections
This also merges `TKeyedArray` into a one single keyed array. Therefore, this is not limited to aliases anymore.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 23:22:04 +02:00
Maximilian Bösing
094df271a4
feature: add param and return type string to TCallableObject#getKey in case the callable is known
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:29:57 +02:00
Maximilian Bösing
e72af4ed07
feature: allow aliased types within intersection strings
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:29:31 +02:00
Maximilian Bösing
6ea4b56551
qa: introduce failing test for type-aliased intersection string
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:29:08 +02:00
Maximilian Bösing
93c71fe756
feature: introduce CallableTrait#getParamString and CallableTrait#getReturnTypeString
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:28:54 +02:00
orklah
71bb951717
Merge pull request #9632 from othercorey/fix-callmaps
Fix various db callmaps
2023-04-11 09:56:11 +02:00
Corey Taylor
282e3d3d72 Fix various db callmaps 2023-04-10 09:06:29 -05:00
orklah
2aaa577346
Merge pull request #9629 from boesing/bugfix/unused-closure-param-for-required-argument
Do not report required closure arguments as unused
2023-04-10 13:25:29 +02:00
orklah
9faf811520
Merge pull request #9630 from boesing/bugfix/issue-8787
Preserve `non-empty-string` type when combining literal and numeric strings
2023-04-10 10:15:57 +02:00
Maximilian Bösing
3f6a7de162
bugfix: preserve non-empty-string type when combining literal-string with numeric-string types
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 03:15:09 +02:00