1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 10:38:49 +01:00
Commit Graph

9708 Commits

Author SHA1 Message Date
3238f4ef24 Merge branch 'origin_master' 2023-11-27 15:19:51 +01:00
2eed29209c Fix 2023-11-27 14:49:04 +01:00
cd110d549d Cleanup 2023-11-27 13:41:27 +01:00
d59a5493db cs-fix 2023-11-27 13:36:11 +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
fa908e4ee1 Fixes 2023-11-27 11:55:38 +01:00
9e535682c4 Merge remote-tracking branch 'origin/5.x' into HEAD 2023-11-27 11:54:44 +01:00
orklah
982f95c87e
Merge pull request #10408 from tm1000/patch-2
Declare we do not support document highlighting
2023-11-26 21:36:07 +01:00
1e2e2248d9 Fix wrong type 2023-11-26 19:34:49 +01:00
edf9bbb26d Merge remote-tracking branch 'origin/master' 2023-11-26 13:37:57 +01:00
e386b072f3 Fix 2023-11-26 13:33:25 +01:00
35f194e9e8 Fix backtick analysis 2023-11-26 13:12:11 +01:00
Andrew Nagy
461ff956c5
Fixes #10397
Explicitly state that we do not support document highlighting.
2023-11-25 15:20:44 -08: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
00bed512af suppress false positive 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
cea98fffa0 Fix for classes what https://github.com/vimeo/psalm/pull/8503 fixed for functions (as some issues didn't report for other reasons, which were solved since then) 2023-11-18 08:55:20 +01:00
kkmuffme
92bcc5cfe0 Fix that files passed via CLI but are not in projectFiles reported only a limited, random selection of errors instead of all - treat all files passed as CLI args as if they were in projectFiles 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
Ivan Sidorov
88c98ef333 Fixing a crash if a method or property does not exist 2023-11-17 15:50:34 +00: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
orklah
5095f4eb85
Merge pull request #10360 from robchett/remove_early_progress_when_scanning_partial_codebase
A segment of progress was being output early as the startScanningFile…
2023-11-13 21:36:05 +01: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
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
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
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