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
18a6c0b6e9
Implement by-ref closure use analysis
2023-12-03 15:28:51 +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
orklah
794bdaac4f
Merge pull request #10422 from tscni/fix/match-null-coalesce
...
Restore support for null coalesce on match expressions
2023-12-02 14:29:20 +01:00
f652cf09d8
Merge branch 'fix_array_key_exists_negation' into fix_literal_union_key
2023-12-01 16:31:24 +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
edf2d1e4b6
Fix
2023-12-01 15:03:17 +01:00
461cd184e5
cs-fix
2023-12-01 12:25:30 +01:00
8111319fc3
Fix
2023-12-01 12:25:04 +01:00
eabb57ff02
Use correct file path while adding unused suppressions for virtual __constructs
2023-12-01 12:03:24 +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
kkmuffme
4f25ccee40
update define types to be correct
2023-11-29 08:51:15 +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
1e2e2248d9
Fix wrong type
2023-11-26 19:34:49 +01:00
e386b072f3
Fix
2023-11-26 13:33:25 +01:00
35f194e9e8
Fix backtick analysis
2023-11-26 13:12:11 +01:00
kkmuffme
00bed512af
suppress false positive
2023-11-18 08:55:20 +01:00
kkmuffme
adb8677f20
Fix optional args not enforced in callable (fix for non-closure/arrow functions of https://github.com/vimeo/psalm/issues/8438 ) Fix array callables not treated as callable https://psalm.dev/r/23f3787207 (this is needed to fix the optional args enforcement for array callables too)
2023-11-18 08:55:20 +01:00
kkmuffme
5eacd301e9
Fixed ReturnTypeWillChange false positive https://psalm.dev/r/91c6992bf1 with missing return type signature
2023-11-18 08:55:20 +01:00
kkmuffme
0252bbbd7c
Fixed https://psalm.dev/r/7f112fd745 - MethodComparator only reported an error for this if the parent class was user defined (= not in stubs), which is wrong, since this will cause a fatal error when running the code
2023-11-18 08:55:20 +01:00
kkmuffme
c5655c510d
Fix param providers for native methods not working Fix array_filter params callable incorrect required params depending on the 3rd argument value (at this commit psalm doesn't report an error, due to https://github.com/vimeo/psalm/issues/8438 , which gets fixed by this PR later on though) Fix https://github.com/vimeo/psalm/issues/3047 and further improve types for array_multisort and add errors for invalid params Fix SimpleTypeInferer failing on bitwise operations with constants
2023-11-18 08:55:20 +01:00
kkmuffme
88e3cda3b9
remove unused function, fix unusedVariable error after suppress
2023-11-13 20:24:58 +01:00
kkmuffme
dcd53cadab
Suppressing NoValue should not treat subsequent code as unevaluated
...
Fix https://github.com/vimeo/psalm/issues/10302
2023-11-13 18:57:41 +01:00
orklah
7acc50eef0
Merge pull request #10318 from danog/finalize
...
Finalize all internal classes
2023-11-03 20:57:06 +01:00
07b45b8116
Get rid of legacy 7.3 logic
2023-10-26 17:18:33 +02:00
ec23f998ea
Finalize all internal classes
2023-10-26 17:00:29 +02:00
Daniel Linjama
a375f441f2
fix @param-out with named arguments
2023-10-23 10:39:09 +03:00
4c656f0a2b
Revert
2023-10-21 20:50:08 +02:00
596ee11d0d
cs-fix
2023-10-21 20:48:06 +02:00
3b66272aa0
More rector fixes
2023-10-21 20:45:09 +02:00
cddf6a9a57
Rector fixes
2023-10-21 20:44:04 +02:00
8ca610ae60
Fix
2023-10-19 11:23:24 +02:00
576e4d2bc4
Fix method calls and property accesses after extension_loaded
2023-10-19 11:16:20 +02:00
robchett
e2d1e83b87
Fix memory explosion with calls to method_exists
2023-10-17 19:15:23 +01:00
orklah
b432d812fb
Merge pull request #10274 from tuqqu/enum-case-value-type-from-class-constant
...
Fix inferring enum case value from a class constant
2023-10-16 20:25:11 +02:00
orklah
c9c3067044
Merge pull request #10279 from trusting-thompson/final-static-constant-type
...
fix final class constant type
2023-10-16 20:24:25 +02:00
orklah
7a7d6a25af
Merge pull request #10242 from cgocast/5.x
...
Allow tainted numerics except for 'html' and 'has_quotes'
2023-10-16 20:17:39 +02:00
Daniel Linjama
545e21b56b
fix final class constant type
2023-10-13 14:18:58 +03:00
tuqqu
d0825b5fe2
Fix for inferring enum case value from a class constant, const test fix
2023-10-13 01:15:05 +02:00
tuqqu
6039e2be9b
Fix for inferring enum case value from a class constant
2023-10-10 22:56:36 +02:00
orklah
3f7306d8df
Merge pull request #10254 from tuqqu/never-function-return-error-message
...
Fix error message for implicitly returning functions with `never` return type
2023-10-09 18:51:11 +02:00
cgocast
eea7c33309
Merge branch 'vimeo:5.x' into 5.x
2023-10-09 14:17:50 +02:00
tuqqu
a4cebb2cb8
Disallow never type for parameters
2023-10-08 20:47:37 +02:00
robchett
d874aab881
Add alias support to psalm-check-type
2023-10-08 17:46:59 +01:00
tuqqu
2a910d1f17
Changed error message for never return error
2023-10-04 21:00:04 +02:00
tuqqu
413f1d6ce3
Fix error message for returning function with never return type
2023-10-04 20:51:31 +02:00
tuqqu
9f9e5f1e18
Emit MethodSignatureMismatch when descendant does not return by reference
2023-10-03 03:41:11 +02:00
cgocast
e0c24cbe7a
Remove unused parents_nodes
2023-10-02 15:38:01 +02:00