kkmuffme
c2388b4d90
fix failing tests and shepherd
2023-07-02 08:33:43 +02:00
Roland Franssen :)
039c526c58
Update PsalmRunnerTrait.php
2023-07-01 16:47:42 +02:00
Roland Franssen :)
06172740cd
Update PsalmRunnerTrait.php
2023-07-01 13:40:04 +02:00
Roland Franssen :)
f0e2856963
Update PsalmRunnerTrait.php
2023-07-01 13:36:42 +02:00
Roland Franssen :)
7cf87b28dc
Update PsalmRunnerTrait.php
2023-07-01 13:28:05 +02:00
kkmuffme
26eb870e47
fix mixed replace return types for arrays
...
* remove useless replace return type provider code that returned incorrect type for array replacements and was worse duplicate of existing stubs
* require preg patterns to be non-empty-strings as otherwise it will throw a PHP notice
* improve return type of array replacements to be more correct (not fully correct due to https://github.com/vimeo/psalm/issues/5994#issuecomment-1614601590 )
2023-06-30 17:08:03 +02:00
kkmuffme
2dd26cb0f1
Fix sprintf single arg splat array
...
Fix https://github.com/vimeo/psalm/issues/9873#issuecomment-1612901224
2023-06-29 13:47:42 +02:00
Yannick Gottschalk
f93d23899d
Fix glob CallMap and stub to prevent crash on alpine (and possibly other systems)
2023-06-25 13:17:13 +02:00
kkmuffme
0535c6b877
PHP 7 format with only placeholders isn't falsable if valid
...
limit tests to PHP 8 to avoid having to create them twice and add specific test for Issue 9941
2023-06-24 18:11:15 +02:00
kkmuffme
28b9e8dd95
run format checks for splat too
2023-06-24 18:11:15 +02:00
kkmuffme
fad17686bd
Fix false positive for array unpacking
...
Fix https://github.com/vimeo/psalm/issues/9873
2023-06-24 18:11:15 +02:00
Tinjo Schöni
a737ca8072
Consider a property type change as a signature change
2023-06-24 15:31:15 +02:00
Tinjo Schöni
703a4b46c3
Add test case for property type change not invalidating methods
2023-06-24 14:29:28 +02:00
Tinjo Schöni
1b1915eaf5
Make file storage cache handling consistent
2023-06-24 14:29:28 +02:00
Tinjo Schöni
9939cae52d
Support project analysis with file diffing in tests
2023-06-24 14:29:28 +02:00
Maximilian Bösing
2d84b06cfa
qa: introduce failing test
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-06-23 20:44:33 +02:00
orklah
01e2ac78d4
Merge pull request #9950 from orklah/iterableInt
...
fix reconciliation between a list and iterable
2023-06-22 23:45:39 +02:00
orklah
8929f8b4d8
fix reconciliation between a list and iterable
2023-06-22 23:37:40 +02:00
Tinjo Schöni
474f8874f0
Add test case for file deletes not invalidating methods
2023-06-20 01:01:24 +02:00
Tinjo Schöni
3e2de9d152
Implement a way to test cache issues
2023-06-20 01:01:23 +02:00
orklah
8e636086b3
put config to true to prevent deprecations for new config files ( #9857 )
...
* put config to true to prevent deprecations for new config files
2023-06-19 22:02:29 +02:00
orklah
e2dde5d200
Merge pull request #9922 from robchett/elseif_shouldnt_be_modifying_outer_scope
...
Don't update types of the outer scope when in an elseif conditional
2023-06-18 11:00:16 +02:00
robchett
620c7cd68a
Fix bug surfaced from removal of elseif scope modification
2023-06-17 15:02:31 +01:00
robchett
7792b6c36c
Don't update types of the outer scope when in an elseif conditional
2023-06-17 13:36:29 +01:00
robchett
338b50a959
Change __LINE__ to a positive-int
2023-06-17 12:24:09 +01:00
orklah
eb64a471c4
Merge pull request #9903 from ygottschalk/fix/9827-union-empty-array-and-false
...
Fixes #9827
2023-06-15 21:19:44 +02:00
kkmuffme
16aaa3ae2b
regex cleanup
2023-06-13 22:07:51 +02:00
kkmuffme
51fd63cfbb
fix CI warnings
2023-06-13 16:59:25 +02:00
kkmuffme
8a8aeb6452
fix tests
2023-06-12 19:44:22 +02:00
kkmuffme
d0f14ba19e
ignore complex placeholders for now
...
Fix https://github.com/vimeo/psalm/issues/9900
Fix https://github.com/vimeo/psalm/issues/9901
Fix original core stubs sprintf returning a wrong type too (unrelated to return type provider) for placeholders that are always empty
2023-06-12 19:44:22 +02:00
kkmuffme
9bc4752e29
add checks for complex empty format and make return type more specific
2023-06-12 19:44:22 +02:00
kkmuffme
9232e4e76b
code style
2023-06-12 19:44:22 +02:00
kkmuffme
697d06b24d
fix empty format return type, add errors for empty format or format without placeholders
2023-06-12 19:44:22 +02:00
orklah
715a91d15c
Merge pull request #9889 from dkarlovi/feat/cache.gz
...
feat: cache.gz
2023-06-12 18:50:01 +02:00
Yannick Gottschalk
d11bb90c96
Style fixes
2023-06-12 15:29:22 +02:00
Yannick Gottschalk
40ce0cf7d7
Fixes #9827
2023-06-12 15:25:17 +02:00
orklah
b6cba5a377
Merge pull request #9877 from kkmuffme/sprintf-improve-return-param-type-validation
...
Sprintf improve return param type validation
2023-06-11 13:08:24 +02:00
Dalibor Karlović
495a466c5e
init cache in child classes
2023-06-09 15:57:29 +02:00
kkmuffme
3179498643
check args for sprintf + printf
...
* check args for (s)printf for Invalid/TooMany/TooFew
* don't change the return type when we cannot infer it more specifically (nullable return)
* fix https://github.com/vimeo/psalm/issues/9874
* implement https://github.com/vimeo/psalm/issues/9817
* add tests
2023-06-09 12:59:13 +02:00
kkmuffme
0a54c84055
readonly does not have write access, therefore is safe as long as the type is contained in the parent type
...
Fix https://github.com/vimeo/psalm/issues/9831#issuecomment-1569022701
2023-06-09 12:37:41 +02:00
orklah
08d5b719c7
Merge pull request #9878 from ygottschalk/fix/9820-glob-stub
...
Glob return type stub
2023-06-07 20:32:40 +02:00
andrew
4f5dfa7350
Better intersection of template types during inheritance check
2023-06-07 17:58:25 +03:00
Yannick Gottschalk
8bab567aac
Merge branch 'master' into fix/9820-glob-stub
2023-06-07 11:45:16 +02:00
Yannick Gottschalk
c74d431fdf
Fixed style issues
2023-06-07 08:52:54 +02:00
kkmuffme
08d515d7af
don't autoload AllowDynamicProperties
2023-06-07 08:41:44 +02:00
kkmuffme
ed9fbab1c4
don't autoload Mockery/Closure
2023-06-07 08:31:53 +02:00
kkmuffme
40679e9a82
fix failing mock tests
2023-06-07 08:12:31 +02:00
Yannick Gottschalk
a130e2f06c
Fixes #9820
2023-06-06 17:02:28 +02:00
orklah
9d1c2c4596
Merge pull request #9866 from klimick/fix-generic-type-params-mapping
...
Fix generic type params mapping
2023-06-04 23:05:04 +02:00
orklah
43df1dc9ba
Merge pull request #9865 from klimick/intersection-with-template
...
Intersect template types during inheritance check
2023-06-04 23:01:28 +02:00
orklah
c15860508b
Merge pull request #9853 from kkmuffme/multiple-psalm-assert-if-for-array-list
...
Allow if/false assert for same variable to allow array/list distinction
2023-06-04 22:59:37 +02:00
andrew
02addbe79c
Fix generic type params mapping
2023-06-02 17:36:13 +03:00
andrew
38bd4d8c0d
Intersect template
2023-06-02 14:48:20 +03:00
orklah
75baaf7889
Merge pull request #9844 from kkmuffme/property-no-set-in-constructor-abstract-false-positive
...
PropertyNotSetInConstructor should not report for abstract constructors
2023-06-01 07:21:23 +02:00
kkmuffme
103e7b343c
PropertyNotSetInConstructor should not report for abstract constructors
...
since they do not have any code
Fix https://github.com/vimeo/psalm/issues/9830
2023-06-01 01:38:33 +02:00
kkmuffme
1f2db5f31c
Allow if/false assert for same variable to allow array/list distinction
...
Fix https://github.com/vimeo/psalm/issues/9037
2023-06-01 01:08:06 +02:00
orklah
a762b6c3bb
Merge pull request #9841 from kkmuffme/sprintf-basic-return-type-provider
...
sprintf basic non-empty-string return type provider
2023-05-31 23:36:03 +02:00
Alies Lapatsin
174cd5c0fe
Introduce and use IssueData constants for severity
...
they are not the same as Config::REPORT_* constants
2023-05-31 12:38:15 +02:00
kkmuffme
8606d5585f
sprintf basic non-empty-string return type provider
...
Fix https://github.com/vimeo/psalm/issues/9819
This PR is a starting point for improving the sprintf return type and eventually validate the format, param types and param count.
(see https://github.com/vimeo/psalm/issues/9817 , https://github.com/vimeo/psalm/issues/9818 )
2023-05-30 22:11:17 +02:00
orklah
88aae91e55
Merge pull request #9835 from staabm/patch-5
...
Fixed typo in ConstantTest
2023-05-30 21:08:47 +02:00
kkmuffme
e3e7373e99
fix test string format
2023-05-30 16:55:13 +02:00
kkmuffme
c185437955
fix string format in test
2023-05-30 16:49:10 +02:00
kkmuffme
9d7d4bff28
non-empty-string always returs non-empty-string, fix tests
2023-05-30 16:44:23 +02:00
kkmuffme
25c7f37a44
add test, fix wrong test and fix shepherd
2023-05-30 16:29:47 +02:00
Markus Staab
9af897f328
Fixed typo in ConstantTest
2023-05-30 08:43:54 +02:00
orklah
2bbfca6d9f
Merge pull request #9829 from klimick/map-closed-inheritance-to-union
...
Mapping closed inheritance to union during assertion
2023-05-29 20:14:31 +02:00
Yannick Gottschalk
a41eb35b24
Fix #9824
2023-05-28 17:37:16 +02:00
klimick
38c93db889
More closed inheritance assertion tests
2023-05-27 18:55:27 +03:00
klimick
b7b20771c0
Add closed inheritance assertion tests
2023-05-27 13:40:23 +03:00
Jack Worman
f279c39503
GH-9825
2023-05-26 18:03:05 -04:00
Demmie
cab10721e6
Add a support for multilevel glob wildcards
...
This works just like in Python with "**".
2023-05-24 01:13:26 -04:00
orklah
f90118cdea
Merge pull request #9805 from orklah/memory-psalter
...
allow using more than 8G of memory in psalter
2023-05-22 23:19:03 +02:00
orklah
d23616cafa
allow using more than 8G of memory in psalter
2023-05-22 23:06:02 +02:00
orklah
ed94de5146
fix offset for type param changes
2023-05-21 18:56:54 +02:00
orklah
22fd6fb9db
Merge pull request #9788 from robchett/strpos_stripos_assert_non_empty
...
Narrow the type of $haystack when strpos(...) !== false
2023-05-21 11:42:18 +02:00
RobChett
bd0ba6ee95
Narrow the type of haystack when strpos != false
2023-05-21 10:35:19 +01:00
RobChett
100907b61f
Improve return types of pow()
2023-05-15 01:22:45 +01:00
Jack Worman
f41da745d1
UnsupportedPropertyReferenceUsage
2023-05-12 14:12:12 -05:00
Valentin Vion
3d122a745f
Removed return type false from date and gmdate
2023-05-09 12:02:44 +08:00
orklah
d4c5f85eb0
Merge pull request #9687 from robchett/limit_inheritance
...
WIP - Limit inheritance to a subset of classes #1450
2023-05-07 22:46:05 +02:00
RobChett
aa85669645
Change the Issue type and add documentation
2023-05-07 11:34:33 +01:00
RobChett
cad5288484
Support interfaces
2023-05-07 11:33:39 +01:00
RobChett
de877f1dcf
Add support for @psalm-inheritors
2023-05-07 11:33:38 +01:00
kkmuffme
ad7be63c0b
fix tests/internal code
...
@var comments needed due to https://github.com/vimeo/psalm/issues/9754 and https://github.com/vimeo/psalm/issues/9753
2023-05-06 19:18:27 +02:00
orklah
0ea2a6a567
Merge pull request #9742 from fluffycondor/allow-phpdoc-dynamic-properties
...
Allow dynamic properties from PHPDoc
2023-05-06 15:56:16 +02:00
andrew
cfd0f062f7
Fix union argument types check against templated param
2023-05-06 16:01:16 +03:00
orklah
8d15fa1d79
Merge pull request #9735 from tscni/fix/missing-global-override-file-storage
...
Fix missing global class type when scanning cached files
2023-05-05 22:08:21 +02:00
fluffycondor
86fd504965
Allow dynamic properties from PHPDoc
2023-05-04 18:49:41 +02:00
orklah
7483f4d809
Merge pull request #9740 from edsrzf/better-property-error
...
Fix OverriddenPropertyAccess error message
2023-05-04 18:49:00 +02:00
orklah
f8895edf4d
Merge pull request #9738 from klimick/fix-invalid-cast-for-templated-class-string
...
Fix invalid cast for templated class-string
2023-05-04 18:43:41 +02:00
orklah
32bd8f66e6
Merge pull request #9739 from klimick/match-paradoxical-condition-with-complex-expr
...
Fix ParadoxicalCondition with complex match expression
2023-05-04 18:39:17 +02:00
andrew
a18eb447e0
Test match on class const fetch
2023-05-04 17:21:50 +03:00
andrew
948ece9dea
Fix string negation to never
2023-05-04 15:34:18 +03:00
Tinjo Schöni
595388b7d7
Add test case for FileScanner adding class reference for configured global
2023-05-04 12:05:32 +02:00
Evan Shaw
d2f0f6ce30
Fix OverriddenPropertyAccess error message
...
The message previously didn't mention the base class, which made it
confusing.
2023-05-04 21:51:16 +12:00
klimick
ac8d489413
Fix ParadoxicalCondition with complex match expression
2023-05-04 11:58:39 +03:00
andrew
57b3876796
Fix invalid cast for templated class-string
2023-05-04 11:25:52 +03:00
orklah
a5effd2d2d
Merge pull request #9681 from robchett/no-seal-methods_and_no-seal-propeties
...
Add support for @psalm-no-seal-properties and @psalm-no-seal-methods
2023-05-02 19:20:34 +02:00
orklah
4843a350a0
Merge pull request #9720 from Jean85/fix-ambiguous-constant-inheritance
...
Fix ambiguous constant inheritance false positive
2023-04-28 23:22:31 +02:00
Alessandro Lai
54531a1d31
Add regression test for non-ambiguous constant inheritance
2023-04-27 22:39:52 +02:00
481a5bd61d
Fix date return type provider
2023-04-25 11:41:39 +02:00
orklah
720f3f1dc2
Merge pull request #9704 from Nicelocal/fix_new_template_object
...
Allow running new on template objects
2023-04-24 16:29:34 +02:00
f6e0c5b6ac
Fix
2023-04-24 14:29:45 +02:00
7a2a68bb46
Update
2023-04-24 13:40:19 +02:00
bff2154b23
cs-fix
2023-04-24 13:16:11 +02:00
8288b00ef9
Allow running new on template objects
2023-04-24 13:08:12 +02:00
orklah
2b68046115
Merge pull request #9694 from Nicelocal/unsealed_array_generic_syntax
...
Implement unsealed array generic syntax
2023-04-24 12:50:57 +02:00
orklah
eae04f25f6
Merge pull request #9693 from Nicelocal/fix_9692
...
Fix #9692
2023-04-24 12:48:20 +02:00
orklah
41796e324a
Merge pull request #9700 from klimick/method-contextual-closure-arg-inference
...
Contextual closure arg inference for class methods
2023-04-24 12:47:38 +02:00
Evan Shaw
82090f58c5
Handle included directory paths without crashing
...
If an include or require resolves to a directory, this now raises a
MissingFile error rather than throwing an unhandled UnexpectedValueException.
2023-04-24 11:09:48 +12:00
klimick
cf0ca8b57a
Test contextual closure arg inference for class methods
2023-04-24 00:00:15 +03:00
8078b6dcbf
Fixes
2023-04-21 15:58:05 +02:00
b77ed37d45
Rewrite
2023-04-21 15:49:37 +02:00
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