orklah
b4ad9c00c5
Merge pull request #10505 from kkmuffme/fix-readonly-properties-by-reference-not-reported
...
Add error when using readonly property in by-ref arg
2024-01-09 22:01:51 +01:00
orklah
6c98f25a69
Merge pull request #10500 from kkmuffme/callable-without-args-union-not-handled-correctly
...
Fix callable without args not handled correctly
2024-01-09 21:58:14 +01:00
kkmuffme
9e463bbe75
make tests work in PHP < 8.2
2023-12-19 11:37:14 +01:00
kkmuffme
1ff8518888
Fix https://github.com/vimeo/psalm/issues/9840
2023-12-19 11:07:11 +01:00
kkmuffme
f8a53ebc5d
Fix callable without args not handled correctly
2023-12-18 12:48:13 +01:00
kkmuffme
dee555daaf
filter_input & filter_var return type more specific
2023-12-17 20:34:10 +01:00
Antonio del Olmo
d6cf9faebb
Add support for Override attribute
2023-12-15 11:14:53 +01:00
orklah
3bc8cde539
Merge pull request #10488 from kkmuffme/invalidargument-false-not-true-param
...
add InvalidArgument error when passing false to true param
2023-12-13 18:48:51 +01:00
kkmuffme
d04694f4d4
Fix https://github.com/vimeo/psalm/issues/9267
2023-12-13 15:30:43 +01:00
kkmuffme
cceb1fb8c4
add missing phpdoc in new tests
2023-12-13 15:21:46 +01:00
kkmuffme
af3978281e
remove previously broken test https://github.com/vimeo/psalm/issues/10487
2023-12-13 15:05:48 +01:00
kkmuffme
e6f24d91fd
Fix https://psalm.dev/r/aada187f50 where 2 union types are not intersected and the condition contains both types
2023-12-13 14:10:22 +01:00
kkmuffme
108f626712
fix literal int/string comparisons only using one literal
...
Fix https://github.com/vimeo/psalm/issues/9552
2023-12-13 13:59:26 +01:00
kkmuffme
9be7fceb59
Fix literal string keys int not handled as int as PHP does
...
Fix https://github.com/vimeo/psalm/issues/8680
See also https://github.com/vimeo/psalm/issues/9295
2023-12-13 00:24:50 +01:00
kkmuffme
82ff582280
add error for invalid array key type in docblock
2023-12-13 00:23:14 +01:00
orklah
1df5b3580b
Merge pull request #10454 from kkmuffme/unsealed-not-nonempty-callable-param-should-be-valid
...
fix false positive ArgumentTypeCoercion for callback param
2023-12-12 21:26:24 +01:00
kkmuffme
3c045b30a7
fix false positive ArgumentTypeCoercion for callback param when unsealed and all optional
2023-12-12 14:13:32 +01:00
kkmuffme
20ae081ee1
fix psalm v4 hardcoded in tests
2023-12-12 07:51:21 +01:00
kkmuffme
5fccb33938
dont combine empty string with numeric-string
...
Fix https://github.com/vimeo/psalm/issues/6646
2023-12-07 20:05:16 +01:00
orklah
f4e9837e27
Merge pull request #10450 from nicelocal/fix_class_string_key
...
Fix shaped array class string key combination
2023-12-07 17:52:15 +01:00
576ecd66e6
Fix #10460
2023-12-07 17:29:22 +01:00
0d3485b588
Commit just first part of fix for now
2023-12-07 13:04:59 +01:00
76458e0b50
Add test
2023-12-06 14:52:54 +01:00
4ed0fe934f
Fix shaped array class string key combination
2023-12-06 14:12:19 +01:00
390df68966
Merge branch '5.x' into fix_literal_union_key
2023-12-03 20:55:05 +01:00
37cf82ea52
Merge branch '5.x' into fix_literal_union_key
2023-12-03 20:50:05 +01:00
75633cbc6d
Merge remote-tracking branch 'hub/5.x' into byref_closure_use
2023-12-03 20:47:51 +01:00
18a6c0b6e9
Implement by-ref closure use analysis
2023-12-03 15:28:51 +01:00
b03b846682
Emit UnusedPsalmSuppress issues for suppressed issues already removed by plugins
2023-12-03 11:45:17 +01:00
orklah
0659967d05
Merge pull request #10429 from tscni/fix/trait-call-static
...
Fix static magic method pureness not being inherited from traits
2023-12-02 14:30:49 +01:00
0aeb87c21c
Simplify
2023-12-01 17:57:50 +01:00
17bf9a45a6
Fixup
2023-12-01 17:46:24 +01:00
147129345e
Add failing test
2023-12-01 17:23:35 +01:00
ead2908464
Fixup tests
2023-12-01 17:05:23 +01:00
f652cf09d8
Merge branch 'fix_array_key_exists_negation' into fix_literal_union_key
2023-12-01 16:31:24 +01:00
1a4656564a
Cleanup
2023-12-01 16:31:01 +01:00
ab3a17b7b0
Fix
2023-12-01 16:11:14 +01:00
2e249ab3fa
Create keyed arrays when assigning literal union keys
2023-12-01 16:03:08 +01:00
ef169893aa
cs-fix
2023-12-01 15:07:55 +01:00
cab7cf0330
Fix
2023-12-01 15:03:24 +01:00
edf2d1e4b6
Fix
2023-12-01 15:03:17 +01:00
7e948419cd
Fix array_key_exists negation
2023-12-01 13:37:28 +01:00
Tinjo Schöni
4f458b46bc
Fix static magic method pureness not being inherited from traits
...
https://github.com/vimeo/psalm/pull/10385 "broke" this by propagating pseudo static methods from traits to using classes.
`AtomicStaticCallAnalyzer` was then not capable of dealing with this, because now these static pseudo methods actually exist.
As long as the methods from traits aren't actually transferred to the using class, it seems right that the logic in `AtomicStaticCallAnalyzer` uses `::getDeclaringMethodId()` instead of `::getAppearingMethodId()` for this purpose.
2023-11-29 23:22:14 +01:00
Tinjo Schöni
d91aab15be
Restore support for null coalesce on match expressions
...
https://github.com/vimeo/psalm/pull/10068 added isset restrictions that didn't consider null coalesces on match expressions.
This restores that support by converting the match expression to a virtual variable for the isset analysis, similar to other incompatible expressions.
2023-11-29 02:08:23 +01:00
73a340fde8
Cleanup
2023-11-26 19:46:45 +01:00
35f194e9e8
Fix backtick analysis
2023-11-26 13:12:11 +01:00
orklah
579cc084cc
Merge pull request #10370 from kkmuffme/fix-misc-callable-bugs
...
Fix misc callable bugs
2023-11-22 21:19:56 +01:00
kkmuffme
0d7c5a2d8e
Fix docblock mixed escape hatch
...
revert https://github.com/vimeo/psalm/pull/7663 including previous from_docblock Mixed assignments, as the tests required 2 suppressions and created an escape hatch via mixed on higher psalm error levels, where mixed isn't reported, thus hiding potentially fatal bugs.
It's still possible to run the validation of docblock docs though: a @var declaration that contains both possible types, to ensure later code won't escape any checks (and no @psalm-suppress needed at all)
This is also a required preparation to fix some isset issues of https://github.com/vimeo/psalm/issues/9759
2023-11-21 13:01:55 +01:00
kkmuffme
d94f7bd553
loose comparisons of int with string shouldn't change change the int to empty-mixed
2023-11-21 13:01:15 +01:00
kkmuffme
fd2f876574
Remove tests for partially stubbed classes introduced in https://github.com/vimeo/psalm/issues/849 , as this didn't work correctly and lead to errors not being reported at all in many cases (since the error was reported for the stubs file and therefore suppressed)
...
With the previous commit "Fix for classes what https://github.com/vimeo/psalm/pull/8503 fixed for functions", the stubs of classes where the actual file is in the analyzed files are ignored completely.
2023-11-18 08:55:20 +01:00