1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

755 Commits

Author SHA1 Message Date
webmaster777
c6c6d083e1
Update PossiblyFalseReference.md
Typo than -> that
2022-10-26 19:52:31 +02:00
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
cbd1a27ea7
Merge branch 'master' into merge_4.x 2022-10-16 13:49:21 +02:00
748a74bb2c Merge remote-tracking branch 'origin/4.x' into HEAD 2022-10-16 13:41:27 +02:00
ADmad
9bd4d7a740 Fix template param for SplDoublyLinkedList.
It's key is always an integer.
2022-10-14 11:54:53 +05:30
kkmuffme
b68ac865e1 add docs 2022-09-24 10:44:12 +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
orklah
89b034acaf
Merge pull request #8492 from HypeMC/consistent-docs-examples
Make template constraints examples in docs consistent
2022-09-18 11:23:21 +02:00
HypeMC
014cddb9dd Document the object with properties syntax 2022-09-17 23:46:19 +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
f87becfb3b
Adding note about referencedMethod
Info is taken from https://github.com/vimeo/psalm/issues/2297#issuecomment-549480186
2022-08-13 16:14:51 +02:00
AndrolGenhald
66ebf4a55c Rename TKeyOfArray to TKeyOf. 2022-07-18 14:44:29 -05:00
AndrolGenhald
b51b5ac903 Allow value-of to work with backed enums (fixes #7874). 2022-07-18 14:10:06 -05:00
AndrolGenhald
285740a753 Merge branch '4.x' 2022-07-07 15:01:38 -05: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
Barney Laurance
c064edcbb7
use backticks in docs 2022-06-06 18:26:35 +01:00
Barney Laurance
a7c92661fa
Use int<1,max> to define positivity 2022-06-06 17:05:59 +01:00
Barney Laurance
99372a2286
Clarify in docs that zero is not considered a positive-int
I wasn't sure from reading the docs whether or not Psalm consider zero to be positive.
2022-06-06 16:13:30 +01: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
Mathieu Rochette
9b2cf438a5
fix small error in plugins_type_system.md
int-mask → int-mask-of
2022-05-02 11:08:51 +02:00
Matt Brown
2ef993928c Document @psalm-ignore-variable-* 2022-04-27 01:46:13 -04:00
Matt Brown
20351c6667 Avoid json_encode when serializing non-UTF8 literals
`\Psalm\Internal\Clause::$hash` basically holds a hash on
arbitrary input literals, used for later comparison. Using
`json_encode` fails when dealing with non-UTF8 literals,
which has been replaced by plain PHP `serialize`.

Resolves: #7771
2022-04-27 01:42:37 -04:00
Mark McEver
6e3c305dc0
Documented the allowMissingFiles attribute for ignoreFiles 2022-04-14 10:03:21 -05:00
Mark McEver
ea424d79a6
Merge branch 'master' into master 2022-04-13 12:30:37 -05:00
Mark McEver
d28ead12e0
Documented the allowMissingFiles attribute for ignoreFiles 2022-04-13 12:29:06 -05:00
Jeremiasz Major
ce25b39b5d
Document @psalm-ignore-variable-* 2022-04-08 00:30:23 +02:00
Jeremiasz Major
23ad8d6684
Fix typos 2022-04-07 21:50:19 +02:00
Jeremiasz Major
f4f1a26cf9
Document @psalm-yield 2022-04-07 21:43:12 +02:00
Jordi Boggiano
1eb8b5a853
without with 2022-03-23 14:49:51 +01:00
Jordi Boggiano
88a93294b4
Fix int-mask-of doc example 2022-03-23 12:19:07 +01:00
e7ec124ebb
Add documentation for maxStringLength and maxShapedArraySize configs 2022-03-15 11:05:57 +01:00
d4170feb0f
Add documentation for maxStringLength and maxShapedArraySize configs 2022-03-15 10:14:36 +01:00
Patrick Remy
95de0c8dd6
docs: add key-of and value-of to utility types chapter 2022-02-24 18:50:57 +01:00
Patrick Remy
51f3b9869b
docs: add properties-of type to plugins type system 2022-02-24 18:50:35 +01:00
Patrick Remy
8ebc9b599f
docs: describe template support of properties-of<T> 2022-02-23 21:53:02 +01:00
Patrick Remy
5e74445f70
docs: add utility types chapter 2022-02-22 20:51:17 +01:00
Bruce Weirdan
d7d846edc8
Merge branch '4.x' into upstream-master 2022-02-20 02:31:15 +02: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
eb3df40fbb
Add option to disable @var parsing everywhere except for properties. 2022-02-15 10:04:56 +01:00