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

13112 Commits

Author SHA1 Message Date
Damian Wójcik
793b8d34d8 Add baseline ignoring carriage return test. 2023-03-28 14:40:11 +02:00
Corey Taylor
528bbe3757 Skip gnupg extension in callmap tests 2023-03-28 04:20:39 -05:00
Corey Taylor
730bc221e9 Re-add array_unique() stub which preserved array type 2023-03-28 04:09:50 -05:00
Corey Taylor
718af70e54 Fix array_unique callmap 2023-03-28 04:09:47 -05:00
orklah
b908f4491f
Merge pull request #9547 from phansys/mysqli
[mysql] Add stubs for `mysqli`, `mysqli_result` and `mysqli_stmt` classes
2023-03-27 21:01:19 +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
orklah
49cf5d07cc
Merge pull request #9568 from iFixit/sealed-properties--add-config-for-assumption
@property annotations: allow *not* implying @psalm-seal-properties
2023-03-27 20:33:21 +02:00
Daniel Beardsley
bf00ecae91
Config: document default on new option
Also add it to the config schema.
2023-03-27 10:44:38 -07:00
orklah
dc503ccbda
Merge pull request #9555 from MoonE/mysqli-fetch-field
Add better return type to mysqli fetch_field*
2023-03-27 19:09:34 +02:00
Daniel Beardsley
7b541ed74f
src/Psalm/Config.php: don't use annotations
Psalm was parsing this as a property annotation, derp.
2023-03-27 09:48:36 -07: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
Daniel Beardsley
ad05b138a5
ClassLikeNodeScanner.php: Fix missing $this
Derp!

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2023-03-27 08:14:46 -07: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
Daniel Beardsley
5ff933f2a5
@property annotations: allow *not* implying @psalm-seal-properties
Add a setting that allows usage of `@property` to *augment* classes that
use __get() and __set(). Previously, using `@property` once would force
you to exhaustively list all possible properties. This didn't use to be
the case, but was changed in df33405635

This was really unexpected for our team and for a while we thought it
was a psalm bug until I found the above commit.

We are using `__get()` for ORM objects and we want to use `@property` to
explicitly document some of columns without being forced to document
every column.
2023-03-24 23:35:41 -07:00
Damian Wójcik
350687dcb7 Handle different line endings from baseline. 2023-03-24 10:48:03 +01:00
orklah
ef9a06c467
Merge pull request #9526 from othercorey/cleanup-unreflectable
Clean up unreflectable callmap methods
2023-03-24 07:13:19 +01:00
orklah
7bdb2d6902
Merge pull request #9562 from orklah/dez
always combine the result of expansions
2023-03-23 22:08:16 +01:00
orklah
dfd7ffc459 always combine the result of expansions 2023-03-23 20:51:34 +01:00
Javier Spagnoletti
b65a038553 [mysql] Add stubs for mysqli, mysqli_stmt and mysqli_result classes 2023-03-21 06:10:02 -03:00
Bruce Weirdan
0af503a9fb
Merge pull request #9544 from ygottschalk/doc/psalm-api-on-methods 2023-03-20 09:54:01 -04:00
Yannick Gottschalk
85a1c83591 Added to documentation and tests that api can be used instead of psalm-api 2023-03-20 13:34:44 +01:00
Yannick Gottschalk
a4895c3588 Added to documentation that psalm-api can be used on methods 2023-03-20 13:34:44 +01:00
Bruce Weirdan
b381f47a0a
Merge pull request #9541 from weirdan/mixed-types-coercion 2023-03-19 01:22:24 -04:00
Bruce Weirdan
b25f2e6921
Fixed coercion of mixed into non-empty-mixed
Fixes vimeo/psalm#9540
2023-03-19 00:49:15 -04:00
Bruce Weirdan
c2c2e26d6d
Merge pull request #9538 from weirdan/fix-assertions-on-conditions-leaking-from-else 2023-03-18 19:33:12 -04:00
Bruce Weirdan
963dd5d43d
Additional test
This was actually fixed previously
2023-03-18 03:45:09 -04:00
Bruce Weirdan
5a14f84fc7
Clarify testsss 2023-03-18 02:17:36 -04: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
Paweł Tomulik
0e9f97ed61
make some shepherd tests to pass 2023-03-17 15:56:33 +01:00
Paweł Tomulik
7979ccc1d3
fixed #9605 for class-like compounds 2023-03-17 15:56:33 +01:00
Paweł Tomulik
4393493407
fixed #9605 for function-like compounds 2023-03-17 15:56:33 +01:00
Paweł Tomulik
c60b3ae3de
add more tests for #9506 2023-03-17 15:56:33 +01:00
Paweł Tomulik
3b4eb518a9
add tests for #9506 2023-03-17 15:56:30 +01:00
fluffycondor
f3e950bac7 str_* functions assert for non-empty-string 2023-03-17 17:58:44 +06:00
fluffycondor
cf86b16199 Code style 2023-03-17 16:46:00 +06:00
fluffycondor
723e40840e Add InvalidLiteralArgument tests 2023-03-17 16:41:36 +06:00
fluffycondor
c2dae0e43f Add php8 str_* functions signatures 2023-03-17 16:39:04 +06:00
orklah
531eec6df8
Merge pull request #9497 from ptomulik/issue-9496
Fixed #9496
2023-03-16 19:25:17 +01:00
orklah
c4f6b0cd15
Merge pull request #9528 from paoloconi96/master
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface
2023-03-16 19:01:42 +01:00
orklah
d2428acabf
Merge pull request #9525 from fluffycondor/json-throw-on-error-full-support
Improve json_encode/json_decode functions signatures
2023-03-16 13:05:34 +01:00
Paolo Conizzoli
3ccb1eaffe
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface 2023-03-16 12:01:16 +01:00
Corey Taylor
6dfaafde78 Clean up unreflectable callmap methods 2023-03-16 03:34:45 -05:00
fluffycondor
cfe8651bdd Add tests for falsable return 2023-03-16 12:42:36 +06:00
fluffycondor
2c69e3cdcc
Add explanation
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2023-03-16 12:37:14 +06:00
fluffycondor
0c3fa5b5d0 Add depth range
According to
https://www.php.net/manual/en/function.json-decode.php#:~:text=The%20value%20must%20be%20greater%20than%200%2C%20and%20less%20than%20or%20equal%20to%202147483647
2023-03-16 12:08:48 +06:00
fluffycondor
d11c7cdb8e Add JSON_THROW_ON_ERROR full support 2023-03-16 12:08:07 +06:00
Bruce Weirdan
70a024f5e3
Merge pull request #9519 from edsrzf/eval-inside-call 2023-03-15 15:47:58 -04:00