1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 02:27:59 +01:00
Commit Graph

3574 Commits

Author SHA1 Message Date
Evan Shaw
82090f58c5 Handle included directory paths without crashing
If an include or require resolves to a directory, this now raises a
MissingFile error rather than throwing an unhandled UnexpectedValueException.
2023-04-24 11:09:48 +12:00
orklah
a97b6b8a5e
Merge pull request #9685 from Nicelocal/avoid_wrong_assertions
Avoid wrong assertions when working with objects returned by methods
2023-04-21 11:34:15 +02:00
orklah
b781bd922e
Merge pull request #9679 from robchett/mixedAssignment_from_template_var
Don't throw UnnecesseryVarAnnotation when hinting a mixed template var
2023-04-20 23:52:52 +02:00
RobChett
74c1576b9c Return a non-empty-(lowercase-)string from mb_strtolower 2023-04-20 15:54:13 +01:00
efb5aed879 Avoid wrong assertions when working with objects returned by methods 2023-04-20 13:00:28 +02:00
RobChett
0a40286830 Don't throw UnnecesseryVarAnnotation when hinting a mixed template var 2023-04-19 21:23:40 +01:00
WhizSid
782735e8b2 Fixed crash issue when using multiple literals for array_splice 2023-04-19 00:38:35 +05:30
adrew
ee0395247f Don't expand template for property fetch on TObjectWithProperties 2023-04-17 23:18:03 +03:00
orklah
a9bc87e729
Merge pull request #9656 from boesing/bugfix/issue-8981
(re-)implement object-shape assertions
2023-04-16 21:17:53 +02:00
Maximilian Bösing
66afbb1c33
feature: (re-)implement object-shape assertions
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 02:36:10 +02:00
Maximilian Bösing
ad5631497d
feature: provide support for templated value-of enum values
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 00:38:12 +02:00
orklah
3e50f68794
Merge pull request #9623 from klimick/contextual-inference-for-const-callable
Contextual inference for const callable
2023-04-14 16:22:53 +02:00
orklah
cee88f2c4b
Merge pull request #9643 from whizsid/array_splice
Fixed non empty arg issue in array_splice function
2023-04-13 19:24:16 +02:00
WhizSid
02f8f11736 Handle empty array possibilities from array_splice 2023-04-13 14:37:09 +05:30
tuqqu
ed2285f50a Flatten match arm conditions to check conditions independently 2023-04-13 01:30:14 +02:00
WhizSid
ae67589463 Fixed CI 2023-04-13 01:14:49 +05:30
WhizSid
b19c263fe5 Fixed non empty arg issue in array_splice function 2023-04-13 00:34:29 +05:30
Maximilian Bösing
6d5f999c75
bugfix: do not report required closure arguments as unused
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 01:54:03 +02:00
orklah
763116fab3
Merge pull request #9599 from boesing/feature/callable-object-intersection
Introduce callable object intersection
2023-04-09 11:48:45 +02:00
andrew
d9ad8b420e Ignore specific callables (callable-array, callable-string) in the HighOrderFunctionArgHandler 2023-04-07 14:16:41 +03:00
andrew
2f7a7178ca Docs for HighOrderFunctionArgHandler::remapLowerBounds 2023-04-06 18:23:50 +03:00
andrew
7fba401fdd Callable type expansion for more readable error message 2023-04-06 15:29:59 +03:00
andrew
0456ef82a5 Prevent callable arg type enhancement for simple callable 2023-04-06 10:43:50 +03:00
andrew
d190b751fb Cleanup HighOrderFunctionArgHandler 2023-04-05 18:10:21 +03:00
adrew
a3aed2fc61 Analyse const callable like first-class-callable 2023-04-04 22:17:17 +03:00
Johannes Boost
865e183fa0 fix: fix phpcs errors 2023-04-04 17:59:50 +02:00
Johannes
37976aa117 fix: treat includes starting with '.' and '..' correct 2023-04-04 17:28:45 +02:00
Maximilian Bösing
ee68f16bb6
feature: introduce callable-object intersection type object&callable
This allows devs to annotate that they expect a callable object.
In addition to this, it can also verify return and argument types.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 23:23:28 +02:00
orklah
f78bf32417
Merge pull request #9570 from klimick/first-class-callable-contextual-inference
Contextual inference for first-class-callable
2023-03-28 20:40:04 +02:00
orklah
6ca2f090d6
Merge pull request #9534 from fluffycondor/php8-str-function-signatures
Improve PHP8 str_* function signatures
2023-03-27 21:00:33 +02:00
andrew
2b5faaa02f Fix psalm errors 2023-03-27 18:37:11 +03:00
andrew
72e5709ef2 Handle partially templated first-class-callables 2023-03-27 18:29:22 +03:00
adrew
62a79eeff3 Test with invalid first-class-callable 2023-03-26 22:47:17 +03:00
adrew
f26c16d2ab Contextually resolve templates of first-class-callable arg during call 2023-03-26 19:07:20 +03:00
Bruce Weirdan
2a84a63483
Prevent assertion leaks from else
Fixes vimeo/psalm#9395
2023-03-18 02:09:56 -04:00
fluffycondor
9730f2c073 Don't report InvalidLiteralArgument for paths 2023-03-18 00:05:44 +06:00
Paolo Conizzoli
3ccb1eaffe
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface 2023-03-16 12:01:16 +01:00
Bruce Weirdan
70a024f5e3
Merge pull request #9519 from edsrzf/eval-inside-call 2023-03-15 15:47:58 -04:00
Evan Shaw
37ff3a0657 Remove always-empty ClassAnalyzer leftover_stmts array 2023-03-16 07:03:10 +13:00
Evan Shaw
ce3f7fccd6 Set inside_call for eval expressions 2023-03-15 22:06:36 +13:00
Bruce Weirdan
c7c0b79903
Merge branch 'master' into fix-integer-overflow-in-array-keys 2023-03-14 22:17:04 -04:00
orklah
293b7281f9
Merge pull request #8960 from tm1000/feature/upgrade-lsp-v5
WIP: Performance/Feature Improvements to the Language Server
2023-03-14 07:31:35 +01:00
Bruce Weirdan
4042036e8e
Drop misleading type 2023-03-12 20:12:19 -04:00
Bruce Weirdan
30369e826a
Correctly handle near-overflowing keys and flag autoincrement overflows
Co-authored-by: Maximilian Krög <maxi_kroeg@web.de>
2023-03-12 19:57:14 -04:00
Bruce Weirdan
0e9085f3e0
Handle overflow in SimpleTypeInferer as well 2023-03-12 17:47:42 -04:00
Bruce Weirdan
103aa019da
Fix integer overflow in array keys
Fixes vimeo/psalm#9498
2023-03-12 16:20:13 -04:00
Bruce Weirdan
8adaee61ad
Fix newly found issues 2023-03-11 05:23:49 -04:00
Bruce Weirdan
193a0dbe0e
Don't crash on unary minus overflow
Fixes vimeo/psalm#9464
2023-03-07 12:29:40 -04:00
Bruce Weirdan
36913b13d5
Support for readonly classes 2023-03-03 04:04:12 -04:00
Andrew Nagy
7e9638b729 Merge branch 'master' of https://github.com/vimeo/psalm into feature/upgrade-lsp-v5 2023-03-02 18:10:13 +00:00