1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
Commit Graph

14362 Commits

Author SHA1 Message Date
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
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
orklah
5de8390885
Merge pull request #10362 from robchett/type_aliases_for_static_statement_vars
Allow type aliases for static variables
2023-11-13 21:29:18 +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
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
robchett
f4aef37ae5 A segment of progress was being output early as the startScanningFiles() method was not called before actually starting to scan files 2023-11-09 09:24:46 +00: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
86f503ab82 Docblock psudo methods can be inherited via @mixin
Fixes #3556
2023-11-08 10:48:19 +00:00
robchett
3578b42e5c Add stubs for rdKafka
Fixes #3406
2023-11-08 09:51:12 +00:00
orklah
5f0798844e
Merge pull request #10349 from ohader/docs/psalm-flow-5.x
Add documentation for @psalm-flow
2023-11-06 22:42:54 +01:00
Oliver Hader
e015b7f7de
Add documentation for @psalm-flow 2023-11-06 21:41:56 +01:00
orklah
b775d297bb
Merge pull request #10332 from braindawg/addZipExtensionStub
Stub constants for ZipArchive from ext-zip
2023-11-04 16:35:31 +01:00
orklah
7233f38805
Merge pull request #10263 from robchett/maintain_loop_start_val_after_increment
Maintain loop start val after increment/decrement
2023-11-04 09:59:05 +01:00
orklah
d041b652cd
Merge pull request #10344 from robchett/seal_method_seal_properties_without_prefix
Support @(no-)seal-(properties|methods) annotations without prefix
2023-11-04 09:57:52 +01:00
orklah
f147344741
Merge pull request #10341 from robchett/report_unused_issue_handler_suppressions
Report unused issue handler suppressions
2023-11-04 09:57:16 +01:00