orklah
d92523d305
Merge pull request #10399 from niconoe-/fix-10398
...
Fix #10398 : add missing methods of ReflectionProperty class in CallMap and CallMap deltas.
2023-11-22 21:22:39 +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
Nicolas Giraud
ed1ea524c9
Fix #10398 : add missing methods of ReflectionProperty class in CallMap and CallMap deltas.
2023-11-22 17:19:22 +01:00
orklah
07acefd0b6
Merge pull request #10388 from kkmuffme/temp-empty-reconciliations-failing-tests
...
Fix redundant condition mixed type escape hatch & loose comparison int type shouldnt be mixed
2023-11-21 18:02:53 +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
orklah
5f0332b678
Merge pull request #10391 from tscni/fix/phar-build-failure
...
Fix Phar build failure
2023-11-21 07:21:25 +01:00
Tinjo Schöni
466bda088b
Fix Phar build failure
...
The issue was likely caused by Composer 2.6.4 making the autoloader generation (more) reproducible (composer/composer#11663 )
We can either try to change the generated autoloader with an autoloader suffix, or just change the Psalm root directory for the smoke test. The latter approach seems easier. :P
2023-11-21 01:22:02 +01:00
orklah
577808b12d
Merge pull request #10389 from kkmuffme/fix-ci-tests-chunks
...
fix CI "split" unevenly splits the number of tests
2023-11-18 14:34:44 +01:00
kkmuffme
2c6aa77baf
fix CI "split" unevenly splits the number of tests
2023-11-18 13:31:37 +01:00
orklah
98851b590c
Merge pull request #10379 from kkmuffme/update-decimal-stubs
...
update decimal stubs from documented URL
2023-11-18 10:04:03 +01:00
kkmuffme
00bed512af
suppress false positive
2023-11-18 08:55:20 +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
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
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
kkmuffme
fdbd9b133c
fix prefixed param and document it
2023-11-18 08:10:44 +01:00
kkmuffme
e9b0103c7f
fix prefix
2023-11-18 08:03:30 +01:00
orklah
44a0d4ce9f
Merge pull request #10385 from issidorov/finding-methods-and-properties-for-auto-completion-feature
...
Finding methods and properties for auto completion feature
2023-11-17 20:41:11 +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
Ivan Sidorov
650b8fcd1b
Tests of current behaviors in the auto-completion feature
2023-11-17 15:14:56 +00:00
kkmuffme
a040ad1228
update decimal stubs from documented URL
2023-11-16 09:31:30 +01:00
orklah
d9d08f76f4
Merge pull request #10303 from kkmuffme/suppressing-novalue-should-not-treat-code-as-unevaluated
...
Suppressing NoValue should not treat subsequent code as unevaluated
2023-11-13 21:27:45 +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
orklah
b3ef6a0bd7
Merge pull request #10351 from robchett/rdkafka_stubs
...
Add stubs for rdKafka
2023-11-09 20:21:56 +01:00
orklah
0aa5050109
Merge pull request #10355 from greg0ire/allow-int
...
Allow int keys when calling Redis methods
2023-11-08 23:10:38 +01:00
Grégoire Paris
ba17015dfb
Allow int keys when calling Redis methods
...
In 5bfc0f960b
, risky casting was invoked
as a way to show there is an issue here. However, it is not always
possible to use a string. For instance, there is no such thing as this
in PHP: ["1" => "whatever"]. If you try to create such an array, you
will obtain [1 => "whatever"] instead.
Ironically, this was copied in jetbrains/phpstorm, which is used in
PHPStan, which exhibited that false positive.
See https://github.com/JetBrains/phpstorm-stubs/pull/1454
2023-11-08 22:15:44 +01:00
robchett
3578b42e5c
Add stubs for rdKafka
...
Fixes #3406
2023-11-08 09:51:12 +00:00