cgocast
e0c24cbe7a
Remove unused parents_nodes
2023-10-02 15:38:01 +02:00
cgocast
6eb40e7897
Fix code style
2023-10-02 15:22:57 +02:00
cgocast
2eca720e9d
Merge branch '5.x' of https://github.com/cgocast/psalm into 5.x
2023-10-02 15:13:07 +02:00
cgocast
94a98ccddd
Allow tainted numerics except for 'html' and 'has_quotes'
2023-10-02 15:08:26 +02:00
kkmuffme
1306b62fed
code style
2023-10-01 21:35:45 +02:00
kkmuffme
480708637b
Fix https://psalm.dev/r/77be914054
2023-10-01 21:32:34 +02:00
orklah
c67dce7d14
Merge pull request #10240 from ging-dev/cache
...
fix : #10239
2023-09-30 18:26:59 +02:00
ging-dev
f8c225c576
fix : #10239
2023-09-30 10:36:21 +07:00
orklah
2d3a625379
Merge pull request #10230 from ging-dev/lsp
...
feat(LSP): Improve the autocomplete for nested array shape
2023-09-28 23:42:02 +02:00
orklah
f57088646b
Merge pull request #10191 from boesing/bugfix/inherited-conditional-return-types
...
Resolve inherited conditional return types
2023-09-28 23:08:20 +02:00
orklah
bbcf50396d
Merge pull request #10189 from boesing/feature/inherited-assertions-v2
...
Inherited assertions v2
2023-09-28 23:07:15 +02:00
cgocast
d9400ba191
Handle possibly null $arg_type
2023-09-28 15:34:05 +02:00
cgocast
55843b5ac8
Handle positional argument
2023-09-28 15:23:35 +02:00
cgocast
2217f5e118
Loop over PDOStatement::fetch() arguments
2023-09-28 14:37:44 +02:00
orklah
83485f3fcf
Merge pull request #10234 from tuqqu/block-mode-declare-check
...
Check for declare strict_types in block mode
2023-09-28 09:13:13 +02:00
orklah
a8ef5a213d
Merge pull request #10202 from gmessier/issue-handlers-priority
...
Issue handlers priority
2023-09-28 09:09:33 +02:00
orklah
a843c30950
Merge pull request #10207 from boesing/bugfix/issue-10203
...
Allow object assertions for `mixed` values
2023-09-28 09:08:43 +02:00
orklah
d7236efd76
Merge pull request #10194 from MidnightDesign/issue-8582
...
Allow class-string<T> where T is a union
2023-09-28 09:04:57 +02:00
tuqqu
09fbe99f5b
Check for declare strict types block mode
2023-09-26 20:59:06 +02:00
ging-dev
45807e27b8
feat(LSP): Improve the autocomplete for nested array shape
2023-09-26 01:52:23 +07:00
kkmuffme
c6648aff87
add FILTER_SANITIZE_URL filter to filter_var
2023-09-18 14:51:20 +02:00
Rudolph Gottesheim
3b775f4617
Allow class-string<T> where T is a union
2023-09-18 12:13:34 +02:00
robchett
03e8d19eec
Only the binary op 'plus' works with two arrays
...
Treat the result of any other operation as int|float
Fixes #2123
2023-09-16 15:55:59 +01:00
Maximilian Bösing
3e100b15d9
bugfix: allow object assertions for mixed
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-15 20:19:54 +02:00
Guillaume Messier
bb364a23ad
Fix Code Style
2023-09-13 16:44:53 -04:00
Guillaume Messier
ae427fd60e
Add 'safe' methods to prevent overriding issueHandlers already defined in the configuration
2023-09-13 16:30:33 -04:00
Maximilian Bösing
7c8a5e8b09
bugfix: resolve recursive conditional return types containing templates
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-11 00:04:01 +02:00
Maximilian Bösing
e3920e6f4d
qa: remove unnecessary type juggling regarding inherited assertions
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-10 22:17:30 +02:00
Maximilian Bösing
ad463f38e9
bugfix: always gather class templates
...
No clue why there are conditions on when templates are allowed to get picked up. I've removed this check which actually solves a problem in inherited assertions.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-10 22:17:30 +02:00
Tinjo Schöni
8fbe14a34b
Restore support for namespaced functions in referencedFunction config
2023-09-09 01:47:09 +02:00
Bruce Weirdan
cd8fc46554
Flag invalid declares
2023-09-02 23:41:50 +02:00
robchett
d0c4d170b0
Apply psalm-inheritors to interfaces too
2023-08-31 23:12:10 +02:00
robchett
e23971ca29
InheritorViolation was only being triggered on grand-childen classes
...
Fixes #10167
2023-08-31 23:12:07 +02:00
Bruce Weirdan
cc7ed9586e
Merge pull request #10156 from boesing/bugfix/prevent-infinite-loop-in-type-parser
2023-08-28 12:06:45 +02:00
Bruce Weirdan
3814fbb231
Merge pull request #10157 from boesing/bugfix/assertions-from-inherited-docblock
2023-08-28 12:04:47 +02:00
Maximilian Bösing
66c01813c1
refactor: move assertion detection based on inherited classes/interfaces into internal resolver
...
This also enables `ExistingAtomicStaticCallAnalyzer` to detect those inherited assertions.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 11:09:23 +02:00
Bruce Weirdan
b3150d451a
Fix crash on property access to undefined property on a class with a missing dependncy
2023-08-28 01:58:02 +02:00
Maximilian Bösing
2a0ce2fecc
qa: add newlines to prevent exceeding 120 character line-length limit
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 01:15:49 +02:00
Maximilian Bösing
5e520e6bff
bugfix: properly inherit assertions from parents or implemented interfaces
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 01:12:28 +02:00
Maximilian Bösing
3fa5710400
qa: preserve already detected modifications
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-27 22:38:43 +02:00
Maximilian Bösing
d9ebab6b75
bugfix: prevent infinite-loop when resolving type-aliases
...
The type-expander returns the same `intersection_type` in case something is not properly expandable. To avoid infinite-loop, we do explicitly verify that the expanded alias is actually resolved
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-27 17:08:55 +02:00
Bruce Weirdan
ad0a132d7f
Update src/Psalm/Type.php
2023-08-25 19:30:16 -04:00
Maximilian Bösing
e985e8aadb
qa: add proper parameter type-hint to suit psalm analysis
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:49:02 +02:00
Maximilian Bösing
a6b646f0e3
qa: re-arrange code to avoid line-length limit of 120 chars
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:42:33 +02:00
Maximilian Bösing
a8bb8d38ea
qa: ensure that we do have at least one enum case extracted from the value-of<Enum>
usage
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:41:06 +02:00
Maximilian Bösing
f93ac70a0a
qa: resolving psalm issues
...
- remove unused variable
- add assertion to reduce possible types from `TEnumCase`
- use `TypeCombiner` to provide proper `Union` containing all literals
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:36:20 +02:00
Maximilian Bösing
cd3e294bfd
bugfix: remove atomic type comparator regarding TEnumCase
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:15:53 +02:00
Maximilian Bösing
6c1899df13
qa: apply coding standard
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:08:14 +02:00
Maximilian Bösing
5948559a31
feature: introducing proper handling of value-of
in combination with backed enums
...
This introduces both:
- a bugfix for a regression introduced by `31eaf83c4` which prevents backed enums are incorrectly identified as literals
- an additional feature so that `value-of` can be used with backed enums to assert any of the enum cases values
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-25 23:58:53 +02:00
Maximilian Bösing
31eaf83c49
bugfix: prevent enums from being detected as literals
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-25 23:54:31 +02:00
Bruce Weirdan
b1c25fa30a
Show success message and type stats with GHA formatter
2023-08-24 03:32:18 +02:00
Bruce Weirdan
c34d5132b5
Merge pull request #10115 from edsrzf/file-find-unused-baseline
2023-08-21 09:44:07 +02:00
Bruce Weirdan
0a9e647603
Do not change baseline when checking specific files
2023-08-21 09:25:37 +02:00
Bruce Weirdan
e6aa3fd23c
Extract the list of impure functions into its own dictionary
2023-08-21 06:14:56 +02:00
Bruce Weirdan
46ebe72e69
Correct exit code for invalid version format
...
Addresses https://github.com/vimeo/psalm/pull/10129#discussion_r1299442729
2023-08-21 00:14:26 +02:00
Bruce Weirdan
1474340cf2
Fix crash on array access to undefined class
2023-08-20 23:45:30 +02:00
Nitamet
005eed3d06
Throw and catch exception when specified PHP version is invalid
2023-08-19 00:14:39 +03:00
Nitamet
18b74b1814
Add 8.3 as supported version
2023-08-19 00:01:17 +03:00
Nitamet
2c7391a649
Add versions 5.4-7.3 as supported
2023-08-18 20:32:05 +03:00
Nitamet
5f40d26539
Fix PHP version checking
...
Separate condition to check both cases if the specified string is a valid version and if it is supported
Remove unsupported versions up to 7.4 from regex
2023-08-18 20:09:17 +03:00
Bruce Weirdan
bf8e150f8f
Merge pull request #10123 from weirdan/fix-crash-with-removed-assertion
2023-08-17 22:23:23 +02:00
Bruce Weirdan
73ce16de96
Fixes crash when assertion array is not a list
...
Fixes vimeo/psalm#9984
2023-08-17 22:10:32 +02:00
Bruce Weirdan
32445023d8
strip_tags()/$allowed_tags
can accept arrays since 7.4
...
Fixes vimeo/psalm#4317
2023-08-17 21:36:47 +02:00
Evan Shaw
670bd6afce
Filter baseline when checking individual files
...
This prevents reporting unused baseline entries for other files that
aren't being checked.
2023-08-15 21:16:18 +12:00
orklah
a6e2e31aae
Merge pull request #10093 from kkmuffme/inconsistent-argv-argc-in-context
...
argv and argc were inconsistent in Context with VariableFetchAnalyzer
2023-08-13 19:32:19 +02:00
Bruce Weirdan
4ca9dccb1d
Merge branch '5.x' into fix-10090
2023-08-13 06:03:16 +02:00
Bruce Weirdan
03f7c263fe
Correct type for $enum->name
2023-08-13 05:56:33 +02:00
Bruce Weirdan
dbd94ef85d
Cleanup test
command and fixAll
action
...
None were working.
2023-08-13 05:53:46 +02:00
Kuba Werłos
35183b9542
Add fix
2023-08-12 12:50:24 +02:00
kkmuffme
801cca2aa3
argv and argc were inconsistent in Context with VariableFetchAnalyzer
...
Not sure why argv/argc are declared in context independently in the first place though
2023-08-08 22:29:18 +02:00
Yannick Gottschalk
a4de6d9dc0
Fix #9997
...
- make SimpleXmlElement and SimpleXmlIterator not a universal object crate
- added typed magic __get method to SimpleXmlElement
- adjusted tests to reflect new behaviour of SimpleXmlElement
- added tests
2023-08-05 17:07:08 +02:00
kkmuffme
02385c2b49
code style + update tests
2023-08-04 23:56:47 +02:00
kkmuffme
0a58a68e9a
make (s)printf error reporting more correct/literal
...
Fix https://github.com/vimeo/psalm/issues/10021
Fix https://github.com/vimeo/psalm/issues/9987 again now for all cases (specifically https://github.com/vimeo/psalm/issues/9987#issuecomment-1624360506 )
Use RedundantFunctionCall instead of InvalidArgument, where it's technically valid.
Report TooManyArguments when a format without placeholders is used
Report an error for splat with vprintf/vsprintf
2023-08-04 23:38:48 +02:00
Bruce Weirdan
378b31b67b
Merge pull request #10068 from Nitamet/9949-isset-non-variables
2023-08-01 18:24:50 +02:00
Nitamet
f742af0221
Check if argument passed to isset() is valid
2023-08-01 14:39:10 +03:00
orklah
b9d355e082
Merge pull request #10071 from weirdan/fix-10070
...
Allow method-like strings in `referencedFunction`
2023-08-01 07:16:55 +02:00
Bruce Weirdan
ec842c0f3d
Allow method-like strings in referencedFunction
...
Fixes vimeo/psalm#10070
2023-08-01 06:37:01 +02:00
klimick
809b27c499
Fix variadic callable type check
2023-07-30 11:43:07 +03:00
orklah
80ddbd3898
Merge pull request #10039 from nicelocal/non_falsy_string_literal
...
Fix combination of non-falsy-string and falsy literal
2023-07-29 16:49:47 +02:00
63347e71ae
Merge remote-tracking branch 'hub/5.x' into non_falsy_string_literal
2023-07-29 15:04:04 +02:00
068bfbf8c1
Merge remote-tracking branch 'hub/master' into fix_intersection_scanning
2023-07-28 11:48:01 +02:00
orklah
73ebe227b2
Merge pull request #10055 from thbley/master
...
Add type detection for PDOStatement::fetchAll(PDO::FETCH_CLASS, SomeClass::class)
2023-07-27 19:03:09 +02:00
Thomas Bley
88ddb89763
#9974 fixed return type for FETCH_COLUMN
2023-07-27 16:11:32 +02:00
Thomas Bley
d600705b0c
#9974 removed references_in_scope for setFetchMode
2023-07-27 15:53:05 +02:00
Thomas Bley
13d53ecbf1
#9974 cleanup
2023-07-27 01:59:06 +02:00
Thomas Bley
3d525cbd0e
#9974 cleanup
2023-07-27 01:48:00 +02:00
Thomas Bley
8a6774ba82
#9974 fixed coding styles
2023-07-27 01:45:21 +02:00
Thomas Bley
66bc28d2a8
#9974 extended return type detection for PDOStatement::fetchAll/fetch with FETCH_COLUMN and FETCH_KEY_PAIR
2023-07-27 01:39:21 +02:00
Thomas Bley
fc74ae83e6
#9974 added return type detection for PDOStatement::fetchAll, extended return type detection for PDOStatement::fetch
2023-07-27 00:40:26 +02:00
8364fef8b8
Fix intersection scanning
2023-07-26 10:04:20 +02:00
Bruce Weirdan
a34222aa76
Drop unused parameters for RPC methods
...
Parameters are marshalled using their names and docblock tags, so it's safe to do.
2023-07-26 05:17:38 +02:00
Bruce Weirdan
c2a05c2e90
Ensure correct method call order
2023-07-26 05:17:13 +02:00
Bruce Weirdan
85b2af83da
Cosmetic changes for VSCode
2023-07-26 05:16:36 +02:00
Bruce Weirdan
5f828c75d1
Make sure we get the token
...
Name does matter, as is the presence of docblock
2023-07-26 05:15:55 +02:00
Bruce Weirdan
902f90b19b
Modernize LSP progress reporting
...
This will use `$/progress` when available and fall back to old
telemetry-based reporting otherwise
2023-07-26 05:10:27 +02:00
Bruce Weirdan
be82c3a948
Merge pull request #10033 from weirdan/lsp-container-path-mapping
2023-07-25 01:00:47 +02:00
Bruce Weirdan
4a0a12d9e2
Fix unused var
2023-07-25 00:17:12 +02:00
Bruce Weirdan
e1a30a20a1
Map special RPC paths
...
Now `$/cancelRequest` will be resolved to `$server->cancelRequest()`
and `$/textDocument/whatever` to `$server->textDocument->whatever()`
2023-07-25 00:11:35 +02:00
Bruce Weirdan
bb102760ea
Drop unused property
2023-07-24 21:59:34 +02:00
Bruce Weirdan
0a2a0feaf2
CS fix
2023-07-24 21:59:34 +02:00
Bruce Weirdan
6eb7a688d1
Introduce --map-folder
switch
...
And create PathMapper based on its value
2023-07-24 21:59:34 +02:00
Bruce Weirdan
8a51aaedd4
CS fix
2023-07-24 21:59:34 +02:00
Bruce Weirdan
6b9d9805b1
Account for -r
option
2023-07-24 21:59:34 +02:00
Bruce Weirdan
389aa7965f
Use PathMapper to map paths
2023-07-24 21:59:34 +02:00
Bruce Weirdan
a68c4804f4
Add path mapper
2023-07-24 21:59:34 +02:00
Bruce Weirdan
f634a0047a
CS fix
2023-07-24 21:59:34 +02:00
Bruce Weirdan
c44b9f5c5e
Map LSP paths
2023-07-24 21:59:34 +02:00
Bruce Weirdan
acdb11e679
Use instance methods instead of static
2023-07-24 21:59:34 +02:00
a86aa9a30b
Fix
2023-07-24 09:26:07 +02:00
dfbc9dd177
Fix combination of non-falsy-string and falsy literal
2023-07-24 09:07:46 +02:00
Bruce Weirdan
f64da372f3
Simplify conditions with deep object access
2023-07-23 23:09:46 +02:00
orklah
afaef14f64
Merge pull request #10012 from ygottschalk/fix/10001-always-report-unused-baseline
...
Always report UnusedBaseline issues
2023-07-23 12:35:32 +02:00
Bruce Weirdan
eaf41a1874
Fix incorrect positions set in code action edits
...
Neovim requires positions to supply column as well as row.
2023-07-23 07:09:24 +02:00
rhertogh
8d76314a48
Fixed PHPCS errors for CommentAnalyzer (Multi-line function calls must have a trailing comma after the last parameter).
2023-07-15 19:11:15 +02:00
rhertogh
65ad2f829e
Fixed PHPCS errors for CommentAnalyzer
2023-07-15 19:04:52 +02:00
rhertogh
c362dd5af7
Ensure comment lines are terminated with a new line character (\n).
2023-07-15 19:00:28 +02:00
rhertogh
f378ef1cab
Allow comments in types (e.g. array shape)
2023-07-15 18:43:47 +02:00
rhertogh
9935b2c71e
Merge branch 'master' into inline_comments_in_types
...
# Conflicts:
# tests/CommentAnalyzerTest.php
2023-07-15 15:46:01 +02:00
klimick
38f6d45155
Do not fill template result when arg is unpacked
2023-07-11 11:10:48 +03:00
klimick
9fccf201e3
Fix callable without params inference
2023-07-11 01:01:31 +03:00
Yannick Gottschalk
867290cd06
Always report UnusedBaseline issues
2023-07-10 14:09:11 +02:00
rhertogh
f7fb2c8809
Merge branch 'master' into allow_space_before_array_shape_opening_brace
2023-07-09 14:32:28 +02:00
rhertogh
2285c9d4bd
Fixed codestyle for CommentAnalyzer and use plain instead of multibite string functions
2023-07-06 23:54:50 +02:00
rhertogh
356e6d7bbd
First setup to allow comments in types (e.g. array shape)
2023-07-06 23:40:13 +02:00
kkmuffme
9fd590685c
fix "days" ignore falsable return not ignored correctly
...
see Reflection.php, where the same condition was used already, but was insufficient
2023-07-06 08:21:27 +02:00
rhertogh
242a38c184
Allow space before array shape opening brace and added unit tests for \Psalm\Internal\Analyzer\CommentAnalyzer::splitDocLine()
2023-07-06 00:01:00 +02:00
kkmuffme
8d8adefb6c
no error for printf with only 1 arg
...
Fix https://github.com/vimeo/psalm/issues/9987
2023-07-03 22:59:02 +02:00
kkmuffme
b4126326eb
make stubbed constant types configurable with comment
...
Fix https://github.com/vimeo/psalm/issues/4024
2023-07-03 22:28:25 +02:00
orklah
27798e69a0
Merge pull request #9970 from kkmuffme/missing-composer-lock-should-not-invalidate-cache-created-with-missing-composer-lock
...
Missing composer lock should not invalidate cache created with missing composer lock
2023-07-03 21:42:47 +02:00
orklah
a83c3fe325
Merge branch 'master' into missing-composer-lock-should-not-invalidate-cache-created-with-missing-composer-lock
2023-07-03 21:02:00 +02:00
orklah
9575bc319c
Merge branch 'master' into fix/9968-exhume-enum
2023-07-03 20:59:26 +02:00
orklah
3e54feb9b4
Merge pull request #9964 from ygottschalk/fix/phpparser-deprecation-name-parts
...
Fix/phpparser deprecation name parts
2023-07-03 20:59:09 +02:00
Yannick Gottschalk
e819a608fb
Added issue suppression
2023-07-03 10:40:54 +02:00
Yannick Gottschalk
42b3736c39
Fixed psalm self test
2023-07-03 10:28:16 +02:00
Yannick Gottschalk
1787960027
Fixed exhuming enums as enums, not as classes
2023-07-03 09:57:14 +02:00
orklah
8d1876a8a3
Merge pull request #9981 from kkmuffme/fix-replace-functions-return-type-provider-less-specific
...
fix mixed replace return types for arrays
2023-07-02 12:59:01 +02:00
orklah
53ce62bf28
Merge pull request #9975 from kkmuffme/sprintf-single-arg-splat-array
...
Fix sprintf single arg splat array
2023-07-02 10:08:08 +02:00
kkmuffme
0377dd9eda
code style
2023-07-02 09:45:55 +02:00
kkmuffme
d24df1a077
improve config validation and fix wrong condition
2023-07-02 09:00:53 +02:00
kkmuffme
7593b5bdc6
more code style and shepherd
2023-07-02 08:42:05 +02:00
kkmuffme
c2388b4d90
fix failing tests and shepherd
2023-07-02 08:33:43 +02:00
Roland Franssen :)
b525f9cf70
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
2023-07-01 17:01:49 +02:00
Roland Franssen :)
bf31ffbd92
Update Psalm.php
2023-07-01 16:56:33 +02:00
Roland Franssen :)
f07cdfc129
Update Psalm.php
2023-07-01 16:50:25 +02:00
Roland Franssen :)
33b0693c4f
ugh
2023-07-01 16:47:16 +02:00
Roland Franssen :)
010306fda8
Update Psalm.php
2023-07-01 14:00:12 +02:00
Roland Franssen :)
ce9d9db115
Update Psalm.php
2023-07-01 13:54:15 +02:00
Roland Franssen :)
52c629c331
infer --debug in GHA
2023-07-01 13:48:58 +02:00
Roland Franssen :)
8ed4f94988
Infer output format from GITHUB_ACTIONS env
...
aka --output-format=github
2023-06-30 21:45:11 +02:00
kkmuffme
09a3b4b32c
code style
2023-06-30 17:14:13 +02:00
kkmuffme
26eb870e47
fix mixed replace return types for arrays
...
* remove useless replace return type provider code that returned incorrect type for array replacements and was worse duplicate of existing stubs
* require preg patterns to be non-empty-strings as otherwise it will throw a PHP notice
* improve return type of array replacements to be more correct (not fully correct due to https://github.com/vimeo/psalm/issues/5994#issuecomment-1614601590 )
2023-06-30 17:08:03 +02:00
kkmuffme
62475cb4e8
code style
2023-06-29 14:42:23 +02:00
kkmuffme
2dd26cb0f1
Fix sprintf single arg splat array
...
Fix https://github.com/vimeo/psalm/issues/9873#issuecomment-1612901224
2023-06-29 13:47:42 +02:00
Yannick Gottschalk
5a2f7c0a71
Use getParts() instead of $parts on PhpParser\Node\Name.
...
also use getFirst(), getLast() and getString()
2023-06-28 03:13:25 +02:00
kkmuffme
b877aa7096
misc consistency improvements for cache
2023-06-27 23:23:18 +02:00
kkmuffme
0584339657
if cache was created with missing composer.lock file use it too instead of ignoring it
2023-06-27 23:16:06 +02:00
Yannick Gottschalk
f93d23899d
Fix glob CallMap and stub to prevent crash on alpine (and possibly other systems)
2023-06-25 13:17:13 +02:00
kkmuffme
d4dcee3203
code style
2023-06-24 18:11:15 +02:00
kkmuffme
0535c6b877
PHP 7 format with only placeholders isn't falsable if valid
...
limit tests to PHP 8 to avoid having to create them twice and add specific test for Issue 9941
2023-06-24 18:11:15 +02:00
kkmuffme
c5fee532f3
consistently ignore falsable return, remove unused suppress with new types
2023-06-24 18:11:15 +02:00
kkmuffme
7f0217d1e3
fix incorrect default stubs
2023-06-24 18:11:15 +02:00
kkmuffme
28b9e8dd95
run format checks for splat too
2023-06-24 18:11:15 +02:00
kkmuffme
9599c240b3
code style
2023-06-24 18:11:15 +02:00
kkmuffme
52ca871057
fix try/catch variable must be initialized
2023-06-24 18:11:15 +02:00
kkmuffme
fad17686bd
Fix false positive for array unpacking
...
Fix https://github.com/vimeo/psalm/issues/9873
2023-06-24 18:11:15 +02:00
kkmuffme
f2a9e09136
reorganize code for PHP 7 to also check for invalid argument and reduce duplicate
2023-06-24 18:11:15 +02:00
kkmuffme
151f101f7c
fix PHP 7 sprintf too many arguments false positive
...
Fix https://github.com/vimeo/psalm/issues/9941
2023-06-24 18:11:15 +02:00
Tinjo Schöni
a737ca8072
Consider a property type change as a signature change
2023-06-24 15:31:15 +02:00
Tinjo Schöni
1b1915eaf5
Make file storage cache handling consistent
2023-06-24 14:29:28 +02:00
Tinjo Schöni
9939cae52d
Support project analysis with file diffing in tests
2023-06-24 14:29:28 +02:00
Maximilian Bösing
f482a5cb31
bugfix: pass non-empty
information when reconciling iterable
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-06-23 21:15:37 +02:00
orklah
01e2ac78d4
Merge pull request #9950 from orklah/iterableInt
...
fix reconciliation between a list and iterable
2023-06-22 23:45:39 +02:00
orklah
8929f8b4d8
fix reconciliation between a list and iterable
2023-06-22 23:37:40 +02:00
orklah
bb28c5aa64
Merge pull request #9932 from ygottschalk/fix/cache-fail-silent
...
Fix/cache fail silent
2023-06-21 21:09:56 +02:00
orklah
03b91561a7
Merge pull request #9935 from ygottschalk/fix/cache-config-warnings
...
Make config warn about missing cache related functions
2023-06-21 21:08:39 +02:00
Yannick Gottschalk
dbc4f48e2b
Make config warn about missing cache related functions
2023-06-20 12:40:08 +02:00
Yannick Gottschalk
503c38df03
Make cache writes fail silent
2023-06-20 11:54:05 +02:00
Yannick Gottschalk
66848306f9
Make cache fail silent
2023-06-20 11:51:24 +02:00
Tinjo Schöni
1161edfa33
Invalidate cached methods when referenced files are deleted
2023-06-20 01:01:24 +02:00
Tinjo Schöni
3e2de9d152
Implement a way to test cache issues
2023-06-20 01:01:23 +02:00
orklah
8e636086b3
put config to true to prevent deprecations for new config files ( #9857 )
...
* put config to true to prevent deprecations for new config files
2023-06-19 22:02:29 +02:00
orklah
8ca4110e68
Merge pull request #9930 from orklah/volatile_cache
...
remove StementsVolatileCache for perf reasons
2023-06-19 22:00:19 +02:00
orklah
da8c1da8be
remove StementsVolatileCache for perf reasons
2023-06-19 21:44:00 +02:00
orklah
1b571a1649
improve perfs for switch by not creating reverse assertions against constants
2023-06-19 21:24:46 +02:00
kkmuffme
9d1558b3ca
make compressor configurable
...
Fix https://github.com/vimeo/psalm/issues/9905
Suppress throws for igbinary_unserialize like it was done for @unserialize
2023-06-18 20:22:02 +02:00
orklah
e2dde5d200
Merge pull request #9922 from robchett/elseif_shouldnt_be_modifying_outer_scope
...
Don't update types of the outer scope when in an elseif conditional
2023-06-18 11:00:16 +02:00
orklah
b5159517ce
Merge pull request #9920 from robchett/CoreGenericAttributes
...
Add a stub file for Attributes defined by PHP
2023-06-17 22:11:26 +02:00
robchett
4600d2b224
Fix line lenght
2023-06-17 14:13:04 +01:00
robchett
7792b6c36c
Don't update types of the outer scope when in an elseif conditional
2023-06-17 13:36:29 +01:00
robchett
5fc48bbb62
Add a stub file for Attributes defined by PHP
2023-06-17 12:26:56 +01:00
robchett
721b65ce2f
Add Type::getIntRange
2023-06-17 12:24:09 +01:00
robchett
338b50a959
Change __LINE__ to a positive-int
2023-06-17 12:24:09 +01:00
orklah
eb64a471c4
Merge pull request #9903 from ygottschalk/fix/9827-union-empty-array-and-false
...
Fixes #9827
2023-06-15 21:19:44 +02:00
kkmuffme
16aaa3ae2b
regex cleanup
2023-06-13 22:07:51 +02:00
kkmuffme
d4732f118e
fix minor trim bug in original code and small speed up
2023-06-13 22:04:39 +02:00
kkmuffme
e75d514ada
speed up on unix
2023-06-13 21:55:43 +02:00
kkmuffme
9a4d7aa719
additional gains
2023-06-13 21:52:03 +02:00
kkmuffme
3f3890382b
replace all at once
2023-06-13 21:19:52 +02:00
kkmuffme
5ac3ed08df
additional ones
2023-06-13 20:37:33 +02:00
kkmuffme
394a40b0f7
remove preg, minor performance gain (up to 1%)
2023-06-13 20:29:20 +02:00