AndrolGenhald
225af970cc
Add comments explaining condition for UnusedPsalmSuppress.
2021-12-11 16:14:25 -06:00
AndrolGenhald
bfe7f96b56
Allow suppressing UnusedPsalmSuppress, remove unused suppressions.
2021-12-11 13:23:00 -06:00
orklah
0ba5b0b30a
Merge pull request #7130 from AndrolGenhald/bugfix/fix-class-property-suppression
...
Class property issue suppression fixes.
2021-12-11 19:12:49 +01:00
AndrolGenhald
51d9652b70
Class property issue suppression fixes.
...
Fix @psalm-suppress and @psalm-allow-private-mutation being ignored if nothing else is in the docblock.
Fix @psalm-suppress not allowing extra text after the issue name.
Fix PossiblyUnusedProperty and UnusedProperty suppression not working at the property level.
Fix MissingPropertyType suppression not working at the property level.
2021-12-11 11:45:06 -06:00
Matthew Brown
4229045c23
Remove array properties that are never read
2021-12-11 11:55:37 -05:00
Matthew Brown
b558748db2
Detect unused properties that are written to inside arrays
2021-12-11 11:42:05 -05:00
orklah
76bb8bc655
Merge pull request #7113 from trowski/first-class-callables
...
Added support for first-class callables
2021-12-10 22:40:16 +01:00
Aaron Piotrowski
3c5e99ed1e
Revert reorder of getting method return type and checking args
...
Skipping checking args for first-class callables, but fixes handling of other methods.
2021-12-09 19:02:58 -06:00
orklah
ae765dfba8
Merge pull request #7054 from orklah/6933
...
fix missing case for displaying varId
2021-12-09 23:54:37 +01:00
Aaron Piotrowski
d5519fc53a
Use $stmt->args directly instead of creating new VariadicPlaceholder
2021-12-09 15:51:48 -06:00
Aaron Piotrowski
1f3a37ff02
Add support for first-class callables
2021-12-09 10:54:49 -06:00
orklah
eefdb95765
Merge pull request #7093 from orklah/7090
...
don't stop analyzing array, even if we already have a type and we can't create an object like
2021-12-08 22:37:57 +01:00
AndrolGenhald
ba881c80bf
Use maybeAdd instead of accepts.
2021-12-08 12:15:32 -06:00
AndrolGenhald
b29fc6ad3c
Allow operator overloading for Decimal extension ( fixes #3938 ).
2021-12-08 10:59:37 -06:00
Matthew Brown
8daf9c42a9
Remove useless chunk of code in ScopeAnalyzer
2021-12-07 23:42:17 -05:00
orklah
c17af4128e
don't stop analyzing array, even if we already have a type and we can't create an object like
2021-12-07 19:38:52 +01:00
Bruce Weirdan
2530b33dbd
Merge pull request #7076 from klimick/fix-generic-assertion
2021-12-07 08:08:48 +02:00
orklah
257d237192
ignore ComplexMethod: didn't see any easy refactoring
2021-12-06 20:13:33 +01:00
orklah
75312d93b1
Don't crash when checking purity of __callStatic in a trait
2021-12-06 19:00:37 +01:00
Ricardo Boss
2ec77fe29c
Make name property of enum cases return non-empty-strings ( vimeo/psalm#6964 )
2021-12-06 00:33:57 +01:00
adrew
dee3fc4358
try to fix generic assertions for list and array
2021-12-06 02:25:40 +03:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
orklah
f67a0ca143
Merge pull request #7068 from klimick/fix-yield
...
Detect yield in array expression
2021-12-05 16:25:21 +01:00
Ricardo Boss
8a230110e8
Fix vimeo/psalm#6968
2021-12-05 15:43:38 +01:00
adrew
bc61547bce
detect yield in array expression
2021-12-05 15:33:18 +03:00
Bruce Weirdan
e9d9481ea6
Merge pull request #7060 from rarila/codingstyle-convert-fqn
2021-12-05 02:46:03 +02:00
ralila
9902898c4d
Remove unnecessary bug circumvention and generate new baseline
2021-12-05 01:15:29 +01:00
Matthew Brown
1956b85c41
Remove always-false args ( #7056 )
2021-12-04 10:40:52 -05:00
ralila
f833085a15
Fix fqn usage in php-doc
2021-12-04 03:37:19 +01:00
orklah
2612f5a5f1
fix missing case for displaying varId
2021-12-03 23:46:12 +01:00
ralila
30a65685a2
Import instead of using fqn classes
2021-12-03 21:40:18 +01:00
ralila
7c32325e03
Import instead of using fqn constants
2021-12-03 21:25:22 +01:00
ralila
2a956498bf
Import instead of using fqn functions
2021-12-03 21:07:25 +01:00
ralila
711be643c6
Import instead of using fqn exceptions
2021-12-03 20:29:06 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
orklah
a7e9eea0ca
flag usage of get_class outside class without args ( #7043 )
2021-12-02 00:38:45 +02:00
Bruce Weirdan
28c4f86993
Merge pull request #7027 from rarila/issue-6914
2021-11-30 23:34:00 +02:00
orklah
466137a4c4
Merge pull request #7025 from orklah/6256
...
flag DeprecatedProperty on static fetch
2021-11-29 23:46:25 +01:00
orklah
328dcb093b
fix variable name
2021-11-29 23:41:47 +01:00
orklah
9de9c12851
flag DeprecatedProperty on static fetch
2021-11-29 23:32:27 +01:00
Matthew Brown
175ba83332
Migrate most IssueBuffer::accepts calls to IssueBuffer::maybeAdd ( #7020 )
2021-11-29 14:54:17 -05:00
ralila
15eb8127ee
Reverse parameter list vor preg_match
2021-11-29 14:23:33 +01:00
Bruce Weirdan
28a75652ac
Merge pull request #6997 from zoonru/list_values_paradox
2021-11-29 00:47:12 +02:00
925df22052
Use simplified, proper logic
2021-11-28 13:42:30 +01:00
Bruce Weirdan
806db287d2
Infer ::from()
and ::tryFrom()
return types on backed enums
...
Fixes vimeo/psalm#6429
2021-11-28 09:47:01 +02:00
Bruce Weirdan
03aea28c73
Merge pull request #6995 from vimeo/enum-constants
2021-11-27 21:49:13 +02:00
Bruce Weirdan
97445b52f3
Correctly process constant references on enum-valued variables
2021-11-27 04:32:32 +02:00
Bruce Weirdan
d19aad7db1
Display target PHP version
...
Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.
2021-11-27 02:18:09 +02:00
orklah
72de3b66cc
Merge pull request #7003 from rarila/no-phpdoc-return-void
...
Use return type hints instead of php doc "@return void"
2021-11-26 23:03:28 +01:00
2145a2cbbd
Make sure that the keyed array is actually a list after unsetting
2021-11-26 21:52:34 +01:00