Zena Hirsch
459fdcd588
Fix typo: "unitialized"
2022-10-19 14:36:43 -04:00
Pavel Chaplygin
48da8342ad
Docs: Fix minor php syntax issues in code examples
2022-10-18 14:57:50 +03:00
748a74bb2c
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-10-16 13:41:27 +02:00
kkmuffme
7cdad99645
add RiskyCast
2022-09-19 21:54:16 +02:00
orklah
3b7e508c78
Merge pull request #8473 from kkmuffme/detailed-superglobal-types
...
make superglobals more specific
2022-09-19 10:48:44 +02:00
HypeMC
ee16caf596
Make template constraints examples in docs consistent
2022-09-17 22:20:01 +02:00
kkmuffme
5c39e66b15
fix tests
2022-09-15 19:38:51 +02:00
Daniel Schmelz
9c67b85f39
Fix typos
2022-08-20 23:29:03 +02:00
Thomas Landauer
3bca297fba
Bringing back <?php
2022-06-21 22:45:45 +02:00
Thomas Landauer
80bcc8b5e3
Improving second link too :-)
2022-06-21 21:55:32 +02:00
Thomas Landauer
7201f0941b
Improving link syntax
2022-06-21 20:56:20 +02:00
Thomas Landauer
fd2683fcc6
Adding common problem cases and possible solutions
...
See https://github.com/vimeo/psalm/issues/8133#issuecomment-1162010190
Don't know if this is the best way to explain this, but it's a start :-)
Is there a better way to add the link to https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-mutation-free ?
I also removed the `<?php` tag from the code block.
2022-06-21 20:23:23 +02:00
orklah
ec9a9994f5
Merge pull request #8022 from AndrolGenhald/bugfix/8018-improve-failure-case-for-references
...
Improve handling of unsupported references (fixes #8018 ).
2022-05-27 19:09:05 +02:00
Rudolph Gottesheim
6f00a72446
Fix a typo in MissingConstructor.md
2022-05-27 11:04:00 +02:00
AndrolGenhald
31b4dceaf4
Improve handling of unsupported references ( fixes #8018 ).
2022-05-26 18:28:23 -05:00
AndrolGenhald
c1077f32d3
Improve documentation for InvalidGlobal to explain that it's sometimes valid.
2022-02-18 11:36:25 -06:00
AndrolGenhald
bd963e4baa
Fix issue documentation links.
2022-02-17 13:04:25 -06:00
AndrolGenhald
d09e420939
Add @psalm-check-type
and @psalm-check-type-exact
.
...
I initially added these as part of my TryAnalyzer rewrite to allow testing complicated `finally` types like this:
```
$foo = 1;
try {
$foo = 2;
} catch (Exception $_) {
$foo = 3;
} finally {
$bar = $foo;
/** @psalm-check-type-exact $bar = 1|2|3 */;
}
/** @psalm-check-type-exact $bar = 2|3 */;
```
Using the `'assertions'` in tests doesn't work since the type is different inside the `finally`.
I decided to extract the new annotation from the rest of my changes and do a separate pull request since I think others may find it useful, and it should be much easier to review than the entire TryAnalyzer rewrite.
2022-02-17 10:37:13 -06:00
AndrolGenhald
cc2334f40d
More class const improvements.
...
Add InvalidClassConstType issue as alternative to LessSpecificClassConstType when type isn't contravariant.
Handle final class consts (#6395 ).
Use double quotes for types in class const issues.
2022-02-13 17:19:25 -06:00
Bruce Weirdan
11e60fa261
Merge branch '4.x' into upstream-master
2022-02-11 03:51:48 +02:00
Bruce Weirdan
8a41d61925
Apply suggestions from code review
...
Co-authored-by: AndrolGenhald <AndrolGenhald@users.noreply.github.com>
2022-02-06 00:49:27 +02:00
orklah
e40bcc2d29
doc about property initialization
2022-02-05 12:27:53 +01:00
AndrolGenhald
94eda1a9f9
Fix bullet indentation in documentation.
2022-02-02 14:48:24 -06:00
Bruce Weirdan
f61193b798
Reinstate MethodSignatureMustProvideReturnType
...
It's never emitted, but is there for BC.
2022-01-31 23:38:15 +02:00
Bruce Weirdan
603714518b
Revert "PHP 8.1: Report missing typehints in overridden native methods"
2022-01-31 14:37:42 +02:00
8d0c1c62e8
Ensure all template parameters are specified in classes, interfaces, traits
2022-01-31 10:06:31 +01:00
AndrolGenhald
f9450656e1
Add support for references and improve UnusedVariable checks ( fixes #7254 ).
2022-01-26 12:55:47 -06:00
AndrolGenhald
b68c6116d8
Use PHP 8.1 when testing AmbiguousConstantInheritance.
2022-01-25 15:49:09 -06:00
AndrolGenhald
0edf260d8b
Improve class constant static analysis.
...
Add class const covariance support (fixes #5589 ).
Add check for overriding const from interface in PHP < 8.1 (fixes #7108 ).
Add check for ambiguous const inheritance.
2022-01-25 15:20:17 -06:00
AndrolGenhald
558208e44e
Add type checking for class const assignments, fix several other const issues.
2022-01-22 17:06:54 -06:00
AndrolGenhald
c18a155f77
Support type annotations for class consts ( fixes #942 ).
2022-01-22 17:06:53 -06:00
orklah
af1888b631
Merge remote-tracking branch 'upstream/4.x' into upstream-master4
2022-01-22 17:48:42 +01:00
ef4dd656d0
Update
2022-01-19 12:29:49 +01:00
9021b13b65
Update
2022-01-19 12:29:44 +01:00
d970661182
Add separate issue
2022-01-19 12:20:50 +01:00
orklah
5f749c8a33
remove forbidEcho
2022-01-18 18:14:39 +01:00
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00
orklah
d786e9deef
deprecate attribute forbidEcho
2022-01-14 19:31:03 +01:00
AndrolGenhald
6d385fd8f0
Fix documentation for ComplexMethod/ComplexFunction.
...
Looks like I misunderstood them.
2022-01-12 14:37:52 -06:00
AndrolGenhald
240032568c
Add test for issues.md to ensure all documented issues are listed.
2022-01-12 14:29:23 -06:00
d6ca1d727e
Fix typo in documentation filename
2022-01-11 14:18:04 +01:00
Matthew Brown
ae0063051a
Add better documentation
2022-01-02 14:56:18 +02:00
edc797d1c2
Add docs
2021-12-30 11:56:16 +01:00
Philip Hofstetter
fdeb1954c2
update docs for enum case deprecation
2021-12-22 06:16:42 +01:00
Kamil Tekiela
01d64e606c
Removed misleading parentheses after language construct
2021-12-18 15:20:58 +00:00
Bruce Weirdan
85f2083acb
Flag duplicate constants
...
Fixes vimeo/psalm#6882
Addresses p1 from vimeo/psalm#6471
2021-11-11 00:44:17 +02:00
Bruce Weirdan
0f8ef45110
Forbid properties on enums
...
Fixes vimeo/psalm#6472
2021-11-06 21:57:49 +02:00
orklah
0e83afdb86
Merge pull request #6518 from orklah/fix-truthy
...
improvements of alwaysTruthy/alwaysFalsy
2021-10-04 13:29:49 +02:00
orklah
28edc25f65
fix doc
2021-10-02 10:01:05 +02:00
741c9ee471
Fixes
2021-09-22 10:26:21 +02:00