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

5740 Commits

Author SHA1 Message Date
57dfad65c5
Fix e2e tests 2023-07-24 09:32:46 +02:00
8859e58464
Switch to amp v3 2023-07-24 09:32:45 +02:00
rhertogh
c62d507a0e Added addtitional cases for 'multiLineArrayShapeWithComments' in \Psalm\Tests\AnnotationTest::providerValidCodeParse() 2023-07-16 00:53:37 +02:00
rhertogh
fa107d5e01 Updated docs for comments in Array Shapes with // in the key 2023-07-15 20:15:37 +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
e9445cd422 Test inference with omitted closure param 2023-07-11 11:34:06 +03:00
rhertogh
5a1bb56fc2 3nd attempt to fix CommentAnalyzerTest::providerSplitDocLine() docblock 2023-07-09 14:26:58 +02:00
rhertogh
d2ec23fc71
2nd attempt to fix CommentAnalyzerTest::providerSplitDocLine() docblock (https://github.com/vimeo/psalm/pull/10000#issuecomment-1627430145) 2023-07-08 23:01:35 +02:00
rhertogh
a69b0caa23 Added return type specification for \Psalm\Tests\CommentAnalyzerTest::providerSplitDocLine() (https://github.com/vimeo/psalm/pull/10000#issuecomment-1624354237) 2023-07-07 16:25:10 +02:00
rhertogh
356e6d7bbd First setup to allow comments in types (e.g. array shape) 2023-07-06 23:40:13 +02:00
rhertogh
fc85ecb1f6 Code style fixes for \Psalm\Tests\CommentAnalyzerTest (https://app.circleci.com/pipelines/github/vimeo/psalm/11905/workflows/353387bb-1dcc-4527-9569-c83ebe43864c/jobs/39822) 2023-07-06 18:31:26 +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
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
c2388b4d90 fix failing tests and shepherd 2023-07-02 08:33:43 +02:00
Roland Franssen :)
039c526c58
Update PsalmRunnerTrait.php 2023-07-01 16:47:42 +02:00
Roland Franssen :)
06172740cd
Update PsalmRunnerTrait.php 2023-07-01 13:40:04 +02:00
Roland Franssen :)
f0e2856963
Update PsalmRunnerTrait.php 2023-07-01 13:36:42 +02:00
Roland Franssen :)
7cf87b28dc
Update PsalmRunnerTrait.php 2023-07-01 13:28:05 +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
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
f93d23899d Fix glob CallMap and stub to prevent crash on alpine (and possibly other systems) 2023-06-25 13:17:13 +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
28b9e8dd95 run format checks for splat too 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
Tinjo Schöni
a737ca8072
Consider a property type change as a signature change 2023-06-24 15:31:15 +02:00
Tinjo Schöni
703a4b46c3
Add test case for property type change not invalidating methods 2023-06-24 14:29:28 +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
2d84b06cfa
qa: introduce failing test
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-06-23 20:44:33 +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
Tinjo Schöni
474f8874f0
Add test case for file deletes not invalidating methods 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
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
robchett
620c7cd68a Fix bug surfaced from removal of elseif scope modification 2023-06-17 15:02:31 +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
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
51fd63cfbb fix CI warnings 2023-06-13 16:59:25 +02:00
kkmuffme
8a8aeb6452 fix tests 2023-06-12 19:44:22 +02:00
kkmuffme
d0f14ba19e ignore complex placeholders for now
Fix https://github.com/vimeo/psalm/issues/9900
Fix https://github.com/vimeo/psalm/issues/9901
Fix original core stubs sprintf returning a wrong type too (unrelated to return type provider) for placeholders that are always empty
2023-06-12 19:44:22 +02:00
kkmuffme
9bc4752e29 add checks for complex empty format and make return type more specific 2023-06-12 19:44:22 +02:00
kkmuffme
9232e4e76b code style 2023-06-12 19:44:22 +02:00
kkmuffme
697d06b24d fix empty format return type, add errors for empty format or format without placeholders 2023-06-12 19:44:22 +02:00