1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 18:17:55 +01:00
Commit Graph

5708 Commits

Author SHA1 Message Date
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
orklah
715a91d15c
Merge pull request #9889 from dkarlovi/feat/cache.gz
feat: cache.gz
2023-06-12 18:50:01 +02:00
Yannick Gottschalk
d11bb90c96 Style fixes 2023-06-12 15:29:22 +02:00
Yannick Gottschalk
40ce0cf7d7 Fixes #9827 2023-06-12 15:25:17 +02:00
orklah
b6cba5a377
Merge pull request #9877 from kkmuffme/sprintf-improve-return-param-type-validation
Sprintf improve return param type validation
2023-06-11 13:08:24 +02:00
Dalibor Karlović
495a466c5e
init cache in child classes 2023-06-09 15:57:29 +02:00
kkmuffme
3179498643 check args for sprintf + printf
* check args for (s)printf for Invalid/TooMany/TooFew
* don't change the return type when we cannot infer it more specifically (nullable return)
* fix https://github.com/vimeo/psalm/issues/9874
* implement https://github.com/vimeo/psalm/issues/9817
* add tests
2023-06-09 12:59:13 +02:00
kkmuffme
0a54c84055 readonly does not have write access, therefore is safe as long as the type is contained in the parent type
Fix https://github.com/vimeo/psalm/issues/9831#issuecomment-1569022701
2023-06-09 12:37:41 +02:00
orklah
08d5b719c7
Merge pull request #9878 from ygottschalk/fix/9820-glob-stub
Glob return type stub
2023-06-07 20:32:40 +02:00
andrew
4f5dfa7350 Better intersection of template types during inheritance check 2023-06-07 17:58:25 +03:00
Yannick Gottschalk
8bab567aac Merge branch 'master' into fix/9820-glob-stub 2023-06-07 11:45:16 +02:00
Yannick Gottschalk
c74d431fdf Fixed style issues 2023-06-07 08:52:54 +02:00
kkmuffme
08d515d7af don't autoload AllowDynamicProperties 2023-06-07 08:41:44 +02:00
kkmuffme
ed9fbab1c4 don't autoload Mockery/Closure 2023-06-07 08:31:53 +02:00
kkmuffme
40679e9a82 fix failing mock tests 2023-06-07 08:12:31 +02:00
Yannick Gottschalk
a130e2f06c Fixes #9820 2023-06-06 17:02:28 +02:00
orklah
9d1c2c4596
Merge pull request #9866 from klimick/fix-generic-type-params-mapping
Fix generic type params mapping
2023-06-04 23:05:04 +02:00
orklah
43df1dc9ba
Merge pull request #9865 from klimick/intersection-with-template
Intersect template types during inheritance check
2023-06-04 23:01:28 +02:00
orklah
c15860508b
Merge pull request #9853 from kkmuffme/multiple-psalm-assert-if-for-array-list
Allow if/false assert for same variable to allow array/list distinction
2023-06-04 22:59:37 +02:00
andrew
02addbe79c Fix generic type params mapping 2023-06-02 17:36:13 +03:00
andrew
38bd4d8c0d Intersect template 2023-06-02 14:48:20 +03:00
orklah
75baaf7889
Merge pull request #9844 from kkmuffme/property-no-set-in-constructor-abstract-false-positive
PropertyNotSetInConstructor should not report for abstract constructors
2023-06-01 07:21:23 +02:00
kkmuffme
103e7b343c PropertyNotSetInConstructor should not report for abstract constructors
since they do not have any code

Fix https://github.com/vimeo/psalm/issues/9830
2023-06-01 01:38:33 +02:00
kkmuffme
1f2db5f31c Allow if/false assert for same variable to allow array/list distinction
Fix https://github.com/vimeo/psalm/issues/9037
2023-06-01 01:08:06 +02:00
orklah
a762b6c3bb
Merge pull request #9841 from kkmuffme/sprintf-basic-return-type-provider
sprintf basic non-empty-string return type provider
2023-05-31 23:36:03 +02:00
Alies Lapatsin
174cd5c0fe Introduce and use IssueData constants for severity
they are not the same as Config::REPORT_* constants
2023-05-31 12:38:15 +02:00
kkmuffme
8606d5585f sprintf basic non-empty-string return type provider
Fix https://github.com/vimeo/psalm/issues/9819
This PR is a starting point for improving the sprintf return type and eventually validate the format, param types and param count.
(see https://github.com/vimeo/psalm/issues/9817, https://github.com/vimeo/psalm/issues/9818)
2023-05-30 22:11:17 +02:00
orklah
88aae91e55
Merge pull request #9835 from staabm/patch-5
Fixed typo in ConstantTest
2023-05-30 21:08:47 +02:00
kkmuffme
e3e7373e99 fix test string format 2023-05-30 16:55:13 +02:00
kkmuffme
c185437955 fix string format in test 2023-05-30 16:49:10 +02:00
kkmuffme
9d7d4bff28 non-empty-string always returs non-empty-string, fix tests 2023-05-30 16:44:23 +02:00
kkmuffme
25c7f37a44 add test, fix wrong test and fix shepherd 2023-05-30 16:29:47 +02:00
Markus Staab
9af897f328
Fixed typo in ConstantTest 2023-05-30 08:43:54 +02:00