1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 01:37:23 +01:00
Commit Graph

13357 Commits

Author SHA1 Message Date
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
orklah
a11fd94c9c
Merge pull request #9522 from edsrzf/unused-class-analyzer-property
Remove always-empty ClassAnalyzer leftover_stmts array
2023-03-15 20:09:01 +01: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
c272be1e04
Merge pull request #9499 from weirdan/fix-integer-overflow-in-array-keys 2023-03-14 22:43:11 -04:00
Bruce Weirdan
9b00049d05
Merge pull request #9491 from weirdan/support-numeric-literal-separators-in-docblocks 2023-03-14 22:20:24 -04:00
Bruce Weirdan
8d71479f2f
Merge pull request #9504 from othercorey/fix-strsplit 2023-03-14 22:19:52 -04:00
Bruce Weirdan
c7c0b79903
Merge branch 'master' into fix-integer-overflow-in-array-keys 2023-03-14 22:17:04 -04:00
Maximilian Krög
7822ba848f
Add better return type to mysqli fetch_field* 2023-03-14 23:23:53 +01:00