d8b85f1c04
Implement unsealed array generic syntax
2023-04-21 14:05:05 +02:00
b8672949ec
Fix #9692
2023-04-21 12:33:08 +02:00
orklah
a97b6b8a5e
Merge pull request #9685 from Nicelocal/avoid_wrong_assertions
...
Avoid wrong assertions when working with objects returned by methods
2023-04-21 11:34:15 +02:00
orklah
40d4e560bc
Merge pull request #9691 from robchett/date_gmdate_return_type
...
Add return type provider for date/gmdate
2023-04-21 11:33:02 +02:00
orklah
1dcc4c4fe0
Merge pull request #9686 from Nicelocal/fix_is_object
...
Fix is_object assertions on final classes
2023-04-21 11:32:25 +02:00
RobChett
1a1d9c9bf5
Add return type provider for date/gmdate
2023-04-21 08:12:49 +01:00
orklah
b781bd922e
Merge pull request #9679 from robchett/mixedAssignment_from_template_var
...
Don't throw UnnecesseryVarAnnotation when hinting a mixed template var
2023-04-20 23:52:52 +02:00
orklah
0dcaf1c706
Merge pull request #9678 from robchett/mb_strtolower_maintain_non_empty
...
Return a non-empty-(lowercase-)string from mb_strtolower
2023-04-20 23:44:21 +02:00
RobChett
74c1576b9c
Return a non-empty-(lowercase-)string from mb_strtolower
2023-04-20 15:54:13 +01:00
baff6fb36a
fix is_object assertions
2023-04-20 14:03:35 +02:00
efb5aed879
Avoid wrong assertions when working with objects returned by methods
2023-04-20 13:00:28 +02:00
RobChett
4d9d7cebd9
Add support for @psalm-no-seal-properties and @psalm-no-seal-methods
2023-04-20 07:47:50 +01:00
RobChett
0a40286830
Don't throw UnnecesseryVarAnnotation when hinting a mixed template var
2023-04-19 21:23:40 +01:00
orklah
5efddb4201
Merge pull request #9675 from robchett/master
...
Valid array access on a non-empty-string yields a non-empty-string
2023-04-19 21:12:29 +02:00
RobChett
836953eb7d
Switch TSingleLetter to extend TNonEmptyString instead of TString as it is more precise
2023-04-19 19:27:25 +01:00
orklah
76ebf54262
Merge pull request #9676 from Nicelocal/fix_callable_union_comparison
...
Fix comparison of unions of multiple callables
2023-04-19 13:02:01 +02:00
42fb38403d
Update
2023-04-19 12:37:06 +02:00
e16037ecaf
Fix tests
2023-04-19 11:56:04 +02:00
19fab7a805
Fix comparison of unions of multiple callables
2023-04-19 11:37:04 +02:00
WhizSid
782735e8b2
Fixed crash issue when using multiple literals for array_splice
2023-04-19 00:38:35 +05:30
adrew
aa3b2f2e1d
Test anonymous object template replacement
2023-04-17 23:18:03 +03: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
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
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
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
02f8f11736
Handle empty array possibilities from array_splice
2023-04-13 14:37:09 +05:30
tuqqu
ed2285f50a
Flatten match arm conditions to check conditions independently
2023-04-13 01:30:14 +02:00
WhizSid
9e5266d6fe
Add issue snippet
2023-04-13 01:15:09 +05:30
WhizSid
b19c263fe5
Fixed non empty arg issue in array_splice function
2023-04-13 00:34:29 +05:30
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
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
Maximilian Bösing
10e7299501
qa: add failing test for issue #8787
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 02:43:31 +02:00
Maximilian Bösing
e5ae26d1e6
qa: raise php_version
in ValidCodeAnalysisTestTrait
and
...
`InvalidCodeAnalysisTestTrait` to 7.4
This synchronizes with the minimum of the supported PHP versions via `composer.json` requirements.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 02:03:44 +02:00
Maximilian Bösing
707a0bac6c
qa: add another test to verify required arguments are not being reported
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 01:53:45 +02:00
Maximilian Bösing
3a9817aa74
qa: introduce failing test for #8095
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 00:53:50 +02:00
Maximilian Bösing
803786e44e
qa: restructure UnusedVariableTest
...
This aligns with most recent tests which do consume `InvalidCodeAnalysisTestTrait` and `ValidCodeAnalysisTestTrait`.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 00:53:33 +02:00
orklah
763116fab3
Merge pull request #9599 from boesing/feature/callable-object-intersection
...
Introduce callable object intersection
2023-04-09 11:48:45 +02:00
ADmad
a584314c62
Allow enabling mixed issues reporting for error levels > 2.
...
Refs #9619 .
2023-04-08 06:17:00 +05:30
andrew
8c09d1678b
Try to fix test ClassTemplateTest.templateStaticWithParam
2023-04-07 14:56:58 +03:00
andrew
2f7a7178ca
Docs for HighOrderFunctionArgHandler::remapLowerBounds
2023-04-06 18:23:50 +03:00
Maximilian Bösing
a8ed8a7b5c
revert: class-string
should not allow callable
only
...
As per discussion with Ondřej, `class-string` should explicitly target objects.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-05 14:51:50 +02:00
adrew
a3aed2fc61
Analyse const callable like first-class-callable
2023-04-04 22:17:17 +03:00
Johannes Boost
865e183fa0
fix: fix phpcs errors
2023-04-04 17:59:50 +02:00
Maximilian Bösing
0621ca6e70
qa: add additional test for class-string<callable-object>
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-04 17:43:35 +02:00
Maximilian Bösing
6c58d98d67
feature: treat class-string<callable>
as callable-object
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-04 17:28:58 +02:00
Johannes
37976aa117
fix: treat includes starting with '.' and '..' correct
2023-04-04 17:28:45 +02:00
orklah
610d660cb0
add test
2023-04-04 12:22:41 +02:00
orklah
06e085cf3f
fix coercion detection between two keyed arrays
2023-04-04 12:05:48 +02:00
Maximilian Bösing
b18fb9691b
qa: allow error_levels
notation which is compatible with named arguments
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 23:23:28 +02:00
Maximilian Bösing
ee68f16bb6
feature: introduce callable-object intersection type object&callable
...
This allows devs to annotate that they expect a callable object.
In addition to this, it can also verify return and argument types.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 23:23:28 +02:00
orklah
eb7be110ec
fix level of error when comparing lists of mixed
2023-04-03 11:52:55 +02:00
orklah
87d0854a97
Merge pull request #9586 from boesing/feature/value-of-enum-assertions
...
Introduce `value-of` with backed enum cases in assertions
2023-04-02 18:51:25 +02:00
Corey Taylor
5fa01d8947
Fix remaining intl, reflection. xml and zip callmaps
2023-04-02 06:34:17 -05:00
Maximilian Bösing
3f6f91f0ef
qa: re-order error message to match recent changes
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-01 14:57:21 +02:00
Maximilian Bösing
1d4f496d0d
feature: introduce value-of
in assertions
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-01 14:57:20 +02:00
orklah
8b9ad1eb9e
Merge pull request #9566 from DnwK98/handle-different-line-endings
...
Handle different line endings from baseline.
2023-03-29 23:38:21 +02:00
orklah
e2abc3e554
Merge pull request #9509 from ptomulik/issue-9506
...
Fixed #9506
2023-03-28 21:18:51 +02:00
orklah
f78bf32417
Merge pull request #9570 from klimick/first-class-callable-contextual-inference
...
Contextual inference for first-class-callable
2023-03-28 20:40:04 +02:00
orklah
94f32e9718
Merge pull request #9323 from othercorey/fix-array-unique
...
Fix array_unique callmap
2023-03-28 20:27:18 +02:00
orklah
88f7ca0269
Merge pull request #9576 from othercorey/skip-gnupg
...
Skip gnupg extension in callmap tests
2023-03-28 20:25:25 +02:00
Damian Wójcik
793b8d34d8
Add baseline ignoring carriage return test.
2023-03-28 14:40:11 +02:00
Corey Taylor
528bbe3757
Skip gnupg extension in callmap tests
2023-03-28 04:20:39 -05:00
Corey Taylor
730bc221e9
Re-add array_unique() stub which preserved array type
2023-03-28 04:09:50 -05:00
orklah
6ca2f090d6
Merge pull request #9534 from fluffycondor/php8-str-function-signatures
...
Improve PHP8 str_* function signatures
2023-03-27 21:00:33 +02:00
andrew
72e5709ef2
Handle partially templated first-class-callables
2023-03-27 18:29:22 +03:00
adrew
62a79eeff3
Test with invalid first-class-callable
2023-03-26 22:47:17 +03:00
adrew
f26c16d2ab
Contextually resolve templates of first-class-callable arg during call
2023-03-26 19:07:20 +03:00
Damian Wójcik
350687dcb7
Handle different line endings from baseline.
2023-03-24 10:48:03 +01:00
orklah
ef9a06c467
Merge pull request #9526 from othercorey/cleanup-unreflectable
...
Clean up unreflectable callmap methods
2023-03-24 07:13:19 +01:00
orklah
dfd7ffc459
always combine the result of expansions
2023-03-23 20:51:34 +01:00
Yannick Gottschalk
85a1c83591
Added to documentation and tests that api
can be used instead of psalm-api
2023-03-20 13:34:44 +01:00
Bruce Weirdan
b25f2e6921
Fixed coercion of mixed into non-empty-mixed
...
Fixes vimeo/psalm#9540
2023-03-19 00:49:15 -04:00
Bruce Weirdan
963dd5d43d
Additional test
...
This was actually fixed previously
2023-03-18 03:45:09 -04:00
Bruce Weirdan
5a14f84fc7
Clarify testsss
2023-03-18 02:17:36 -04:00
Bruce Weirdan
2a84a63483
Prevent assertion leaks from else
...
Fixes vimeo/psalm#9395
2023-03-18 02:09:56 -04:00
fluffycondor
9730f2c073
Don't report InvalidLiteralArgument for paths
2023-03-18 00:05:44 +06:00
Paweł Tomulik
c60b3ae3de
add more tests for #9506
2023-03-17 15:56:33 +01:00
Paweł Tomulik
3b4eb518a9
add tests for #9506
2023-03-17 15:56:30 +01:00
fluffycondor
f3e950bac7
str_* functions assert for non-empty-string
2023-03-17 17:58:44 +06:00
fluffycondor
723e40840e
Add InvalidLiteralArgument tests
2023-03-17 16:41:36 +06:00
fluffycondor
c2dae0e43f
Add php8 str_* functions signatures
2023-03-17 16:39:04 +06:00
orklah
531eec6df8
Merge pull request #9497 from ptomulik/issue-9496
...
Fixed #9496
2023-03-16 19:25:17 +01:00
orklah
c4f6b0cd15
Merge pull request #9528 from paoloconi96/master
...
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface
2023-03-16 19:01:42 +01:00
Paolo Conizzoli
3ccb1eaffe
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface
2023-03-16 12:01:16 +01:00
Corey Taylor
6dfaafde78
Clean up unreflectable callmap methods
2023-03-16 03:34:45 -05:00
fluffycondor
cfe8651bdd
Add tests for falsable return
2023-03-16 12:42:36 +06:00
fluffycondor
0c3fa5b5d0
Add depth range
...
According to
https://www.php.net/manual/en/function.json-decode.php#:~:text=The%20value%20must%20be%20greater%20than%200%2C%20and%20less%20than%20or%20equal%20to%202147483647
2023-03-16 12:08:48 +06:00
fluffycondor
d11c7cdb8e
Add JSON_THROW_ON_ERROR full support
2023-03-16 12:08:07 +06:00
Evan Shaw
ce3f7fccd6
Set inside_call for eval expressions
2023-03-15 22:06:36 +13:00
Bruce Weirdan
c272be1e04
Merge pull request #9499 from weirdan/fix-integer-overflow-in-array-keys
2023-03-14 22:43:11 -04:00