1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
Commit Graph

14250 Commits

Author SHA1 Message Date
Bruce Weirdan
9a970cafc3
Update our actual baseline to use the new format 2024-02-03 18:15:40 +01:00
Simon Podlipsky
4fc35949ef
Allow sebastian/diff v6 2024-02-02 10:22:38 +01:00
Ulrich Eckhardt
9fd17cf749 CallMap: Improve returntype annotation for inotify_read()
In case of success, it returns an array of associative arrays with defined fields:
- `wd` is a watch descriptor
- `mask` is a bit mask of events
- `cookie` is a unique id to connect related events
- `name` is the name of a file
2024-02-02 10:10:45 +01:00
Ulrich Eckhardt
1698239677 CallMap: Adjust return type for inotify_add_watch() to int|false
See https://github.com/vimeo/psalm/issues/10636
2024-02-02 09:35:25 +01:00
Bruce Weirdan
fc88ef2f67
Merge pull request #10634 from weirdan/10334-global-constants-as-case-values 2024-02-01 19:10:21 -04:00
kkmuffme
41ce826f6d improve file_put_contents return type 2024-02-01 20:11:06 +01:00
kkmuffme
d2e5a0722b improve realpath and readlink return type 2024-02-01 20:11:06 +01:00
kkmuffme
d79f77215b improve getcwd return type 2024-02-01 20:11:06 +01:00
kkmuffme
fae1d414fd fix errors output in stdout making test fails with cryptic errors 2024-02-01 20:11:06 +01:00
kkmuffme
47c52ad602 fix /src/psalm.xml not removed between tests and remove psalm.xml at the end of tests 2024-02-01 20:11:06 +01:00
kkmuffme
f185f3d985 additional places with inconsistent trailing slash 2024-02-01 20:11:06 +01:00
kkmuffme
d4a5909e1f Fix additional places where base_dir was broken due to missing separator
Improves upon https://github.com/vimeo/psalm/pull/10542 and https://github.com/vimeo/psalm/pull/10628
2024-02-01 20:11:06 +01:00
robchett
421cb0f7a1
Allow enum cases to be global constants 2024-02-01 18:38:46 +01:00
Bruce Weirdan
38d7d435c8
Merge pull request #10625 from weirdan/allow-typedef-imports-from-any-kind-of-classlike 2024-02-01 13:05:07 -04:00
Bruce Weirdan
76364ab2cc
Stable baseline
Fixes vimeo/psalm#10632
2024-02-01 17:54:46 +01:00
Evan Shaw
88c2e00d02 Analyze dynamic class const names 2024-02-01 17:40:25 +13:00
Evan Shaw
a66aace523 Analyze dynamic static property names 2024-02-01 17:31:15 +13:00
Bruce Weirdan
00822074fe
Merge branch '5.21.x' into 5.x 2024-02-01 02:06:03 +01:00
Bruce Weirdan
8c473e2437
Merge pull request #10628 from weirdan/fix-baseline-usage-with-paths-passed-via-cli-args 2024-01-31 21:04:32 -04:00
Bruce Weirdan
138c7b801e
Fix baseline loading for path specified on the command line
Fixes vimeo/psalm#10624
2024-02-01 01:59:18 +01:00
Bruce Weirdan
6140f6881c
Allow typedef imports from any classlike type
All we really need is for the source to be autoloadable, and it includes
all classlikes (interfaces, classes, enums and traits at the time of
writing).
2024-01-31 23:07:23 +01:00
Bruce Weirdan
4fdfbac870
Merge pull request #10623 from weirdan/allow-inline-comments-in-typedef-shapes 2024-01-31 17:10:20 -04:00
Bruce Weirdan
9ec556bb14
Allow inline comments in typedef shapes
Fixes vimeo/psalm#10492
2024-01-31 22:03:36 +01:00
Bruce Weirdan
215d62eb72
Merge pull request #10621 from kkmuffme/fix-numeric-scalar-validate-filter-var-input 2024-01-31 14:28:25 -04:00
kkmuffme
7023855fb3 add scalar & numeric handling for all cases where appropriate and ensure no more generic types being added for int/float (previous commit) 2024-01-31 14:19:53 +01:00
kkmuffme
551625aa4b Fix https://github.com/vimeo/psalm/issues/10561 numeric input incorrect return type 2024-01-31 14:11:10 +01:00
Bruce Weirdan
abe7ae828d
Merge pull request #10619 from fluffycondor/fix-ownerdocument-null 2024-01-31 06:48:34 -04:00
fluffycondor
6aa2ddfe1c Fix ownerDocument type 2024-01-31 16:10:51 +06:00
Bruce Weirdan
04ba9358e3
Merge pull request #10605 from edsrzf/php-parser-tweaks 2024-01-30 18:52:27 -04:00
Bruce Weirdan
35e6effa12
Merge pull request #10617 from weirdan/10416-import-typedefs-from-enums 2024-01-30 16:39:33 -04:00
Bruce Weirdan
6d32d2f692
Allow importing typedefs from enums
Fixes vimeo/psalm#10416
2024-01-30 20:29:51 +01:00
Bruce Weirdan
baa866029e
Merge pull request #10615 from weirdan/10589-fix-missing-MissingConstructor-with-native-mixed-property 2024-01-30 12:47:59 -04:00
Bruce Weirdan
ca9a12ddda
Report MissingConstructor for natively typed mixed properties
Fixes vimeo/psalm#10589
2024-01-30 17:24:27 +01:00
Bruce Weirdan
e02276a17f
Merge pull request #10614 from weirdan/fix-json-mapping-with-opcache.save_comments-0 2024-01-30 00:06:11 -04:00
Bruce Weirdan
98756ba992
Fix language server running with opcache.save_comments=0
Fixes vimeo/psalm#10353
2024-01-30 04:59:12 +01:00
Bruce Weirdan
e63db9c12a
Drop suppression as the method is now used in tests 2024-01-29 22:43:06 +01:00
Bruce Weirdan
b2aebd90a7
Fix test by preloading interface 2024-01-29 22:43:05 +01:00
Bruce Weirdan
e8763968a0
Un-ignore arrayobject::getiterator - appears it's been fixed too 2024-01-29 22:43:05 +01:00
Bruce Weirdan
c935cc307b
Un-ignore recursiveiteratoriterator::__construct 2024-01-29 22:43:05 +01:00
Bruce Weirdan
58b7139470
Reflection may reference interfaces and enums 2024-01-29 22:43:05 +01:00
Bruce Weirdan
67ba758c09
Fix unstable hasFullyQualified(Interface|Enum)()
Before this change, calling:
```php
$classlikes->hasFullyQualifiedInterfaceName($i); // true
$classlikes->hasFullyQualifiedClassName($i); // false
$classlikes->hasFullyQualifiedInterfaceName($i); // false
```
would result in the last call returning `false`
2024-01-29 22:42:58 +01:00
Bruce Weirdan
f045730927
Merge pull request #10598 from weirdan/key_exists-is-an-alias-for-array_key_exists 2024-01-29 16:23:35 -04:00
Bruce Weirdan
fd1294eef4
Merge pull request #10599 from weirdan/allow-properties-on-intersections-with-enum-interfaces 2024-01-29 16:23:20 -04:00
Bruce Weirdan
8354ff3014
Merge pull request #10600 from weirdan/readgzfile-is-impure 2024-01-29 16:23:05 -04:00
Bruce Weirdan
872cf58236
Merge pull request #10601 from weirdan/do-not-validate-callable-arguments-in-lenient-contexts 2024-01-29 16:22:47 -04:00
Bruce Weirdan
79b67f8b81
Merge pull request #10612 from edsrzf/rework-trivial-expr 2024-01-28 21:35:34 -04:00
Evan Shaw
98d98be443 Re-work CheckTrivialExprVisitor
In php-parser 5.0, `ClosureUse` is no longer considered an expression.
This requires changes to Psalm's `CheckTrivialExprVisitor`, which stores
an array of "non-trivial" `Expr` nodes.

However the only use of this array is to count whether or not it's
empty. Instead of keeping the array, we can keep a boolean, and avoid
needing to change the types in this class when we upgrade to php-parser
5.0.
2024-01-29 13:25:25 +13:00
Bruce Weirdan
45f3218fad
Merge pull request #10607 from weirdan/lsp-issue-type-in-description
[LSP] Add issue type in description
2024-01-28 15:05:32 -04:00
Bruce Weirdan
4b2cd0f23f
[LSP] Add issue type in description
Fixes psalm/psalm-vscode-plugin#287
2024-01-28 16:36:03 +01:00
Evan Shaw
f1a206fbf5 Remove usages of deprecated getLine 2024-01-28 14:32:14 +13:00