3238f4ef24
Merge branch 'origin_master'
2023-11-27 15:19:51 +01:00
62ed2b0cec
Hotfix
2023-11-27 13:36:04 +01:00
a84be6465d
Test
2023-11-27 13:27:23 +01:00
bd33348206
Minor fixes
2023-11-27 13:23:52 +01:00
851121b48c
Fix
2023-11-27 12:03:38 +01:00
9e535682c4
Merge remote-tracking branch 'origin/5.x' into HEAD
2023-11-27 11:54:44 +01:00
73a340fde8
Cleanup
2023-11-26 19:46:45 +01:00
edf9bbb26d
Merge remote-tracking branch 'origin/master'
2023-11-26 13:37:57 +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
kkmuffme
3299689d99
revert 804087b
of https://github.com/vimeo/psalm/issues/10026
2023-11-18 08:55:20 +01:00
kkmuffme
be6028d7d4
Fix potential cache race conditions/cache not deleted with non-lowercase file paths and add missing docs
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
0ca2d4f597
Fix https://github.com/vimeo/psalm/issues/6085
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
ba79797627
Fix https://github.com/vimeo/psalm/issues/10371
2023-11-18 08:55:20 +01:00
kkmuffme
506fb9c773
Fix https://github.com/vimeo/psalm/issues/8919
2023-11-18 08:55:20 +01:00
kkmuffme
be85cb02b9
remove now invalid test
2023-11-18 08:55:20 +01:00
kkmuffme
f3e9263ea4
Fix array_filter callback type
...
Fix https://github.com/vimeo/psalm/issues/9068
2023-11-18 08:55:19 +01:00
Ivan Sidorov
e677523843
Fixing a collisions on annotations with mixins
2023-11-17 15:50:34 +00:00
Ivan Sidorov
8bb68e9b3f
Find properties and methods annotated by mixin
2023-11-17 15:50:34 +00:00
Ivan Sidorov
0c4b8a3c49
Find annotated magic static methods on traits
2023-11-17 15:50:34 +00:00
Ivan Sidorov
ceba3d889d
Find annotated magic static methods on parent class
2023-11-17 15:50:34 +00:00
Ivan Sidorov
75394c5037
Find declared methods on parent classes and traits
...
Partial revert commit 2f039f9072
2023-11-17 15:50:26 +00:00
Ivan Sidorov
d533bb8c2e
Ignore annotated magic static methods with usage object gap
...
Magic methods annotated by methods `__call` and `__callStatic`.
Magic static methods implemented in `__callStatic`
are not required implementation in `__call'.
2023-11-17 15:14:56 +00:00
Ivan Sidorov
715f6f51e1
Ignore annotated magic properties with usage static gap
...
In PHP is not exists methods for implementation magic static properties.
So, these magic static properties must not be presented.
2023-11-17 15:14:56 +00:00
Ivan Sidorov
1cfc343c43
Ignore declared static properties with usage object gap
...
Usage static properties in PHP is allow only by static gap.
2023-11-17 15:14:56 +00:00
Ivan Sidorov
6f19440b02
Fix text-labels with type of property
...
The labels for magic and declared properties must be equal.
2023-11-17 15:14:56 +00:00
Ivan Sidorov
650b8fcd1b
Tests of current behaviors in the auto-completion feature
2023-11-17 15:14:56 +00:00
orklah
bb4d80814b
Merge pull request #10361 from robchett/method_annotation_fixes
...
Method annotation fixes
2023-11-13 21:34:36 +01:00
orklah
e85413dd54
Merge pull request #10356 from robchett/inherit_magic_methods_from_mixin
...
Inherit magic methods from @mixin
2023-11-13 21:30:39 +01:00
orklah
3efb292039
Merge pull request #9783 from robchett/remove_MixedInferredReturnType
...
Remove MixedInferredReturnType
2023-11-13 21:29:56 +01:00
kkmuffme
b0adeb463d
fix test
2023-11-13 20:37:48 +01:00
kkmuffme
88e3cda3b9
remove unused function, fix unusedVariable error after suppress
2023-11-13 20:24:58 +01:00
kkmuffme
6a0a9d1c15
fix failing test caused by psalm-suppress as this should be invalidCodeParse test
2023-11-13 19:08:04 +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
robchett
70075e778c
Allow type aliases for static variables
...
Fixes #3837
2023-11-09 16:44:53 +00:00
RobChett
fb7fc1c569
Remove MixedInferredReturnType as the related issue is more accuratly reported by MixedReturnStatement
2023-11-09 16:22:35 +00:00
robchett
84ed631a9f
Correct test min php version
2023-11-09 16:18:36 +00:00
robchett
80edd41858
Fix failing tests with invalid code
2023-11-09 15:57:42 +00:00
robchett
ac465067e3
Warn if @method annotation contradicts concrete function
...
Fixes #5990
2023-11-09 15:43:28 +00:00
robchett
975d59032b
Don't inherit psuedo methods from parent if a concrete implementation exists
...
Fixes #4546
2023-11-09 15:43:28 +00:00
robchett
68d6d9b70b
Trigger ImplementedParamTypeMismatch if concrete implementation of magic method does not match the magic method signature
...
Fixes #3871
2023-11-09 15:43:28 +00:00
robchett
44f9440664
Only inherit docblock param type if they type was not expanded
...
fixes this issue: https://psalm.dev/r/edaea88e00
2023-11-09 15:43:28 +00:00
robchett
61f02d8889
Detect magic method signature mismatch on interfaces
...
Fixes #5786
2023-11-09 14:20:01 +00:00