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
Javier Spagnoletti
b65a038553
[mysql] Add stubs for mysqli
, mysqli_stmt
and mysqli_result
classes
2023-03-21 06:10:02 -03: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
c2dae0e43f
Add php8 str_* functions signatures
2023-03-17 16:39:04 +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
Corey Taylor
39bb7b45a7
Fix return type of str_split()
2023-03-12 21:15:53 -05:00
fluffycondor
2abefb9618
Return a non-empty-string with JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE
2023-03-10 11:34:23 +06:00
Bruce Weirdan
468dd1be4c
PHP 8.2 attributes moved to 8.2 stub
2023-03-03 04:28:37 -04:00
Corey Taylor
615986ef10
Update pack() stub
2023-02-28 23:50:23 -06:00
Javier Spagnoletti
ab13ddf286
[ibm_db2] Improve return type inference for db2_autocommit()
2023-02-24 19:53:42 -03:00
Ulrich Eckhardt
4da0bede35
FFI Stubs: Extend FFI and FFI\CData definitions.
...
Both of these define "fuzzy" datatypes, which are mostly evaluated at runtime.
Currently, much of regular use of these will cause useless errors, so define
the stubs so that they simply support any kind of use that could happen.
2023-02-21 23:08:49 +01:00
Ulrich Eckhardt
056e1288eb
FFI Stubs: Adjust FFI::new() stub.
2023-02-21 23:01:56 +01:00
Corey Taylor
3ddeecec1a
Fix strpos stub return type
2023-02-16 13:34:39 -06:00
Bruce Weirdan
3693300b2d
Made WeakReference
mutable
...
Fixes vimeo/psalm#6544
2023-02-14 19:30:28 -04:00
Kamil Tekiela
8eebebef62
Add curl stubs to prevent crashes
2023-02-13 16:39:40 +00:00
Corey Taylor
cdbd71ba8b
Add DatePeriod::INCLUDE_END_DATE option
2023-02-03 13:37:45 -06:00
orklah
54cd529642
Merge pull request #9170 from mmcev106/filter-var-pure
...
Added @psalm-pure to filter_var()
2023-02-02 23:39:06 +01:00
Mark McEver
b5781c34e8
Fixed a case where the conditional taint, specialize, & flow features were not playing nicely together
2023-02-01 15:41:52 -06:00
Mark McEver
bb2cf1f30a
Added @psalm-pure to filter_var()
2023-01-23 15:09:29 -06:00
orklah
a4d1b0691d
Merge pull request #9085 from BenMorel/newInstanceArgs
...
Fix ReflectionClass::newInstanceArgs() with named parameters
2023-01-19 23:08:21 +01:00
Jack Worman
787b9ae687
Fix dom_import_simplexml()
2023-01-18 18:31:54 -05:00
Benjamin Morel
951f0827a3
Infer getDefaultValueConstantName() type when isDefaultValueConstant() is true
2023-01-15 19:11:10 +01:00
orklah
f415ad56fc
Merge pull request #9073 from therealryanbonham/9066_fix_get_headers_signature
...
Update Call Maps and Signature for get_headers
2023-01-09 18:41:14 +01:00
Alies Lapatsin
63f328cb4c
Unify syntax for redis.phpstub
2023-01-09 14:12:39 +01:00
Benjamin Morel
a669c89074
Fix ReflectionClass::newInstanceArgs()
2023-01-08 23:58:14 +01:00
therealryanbonham
e4e52da218
Merge branch 'master' into 9066_fix_get_headers_signature
2023-01-07 19:27:01 -05:00
orklah
d64023548c
Merge pull request #9067 from weirdan/backed-enum-cases
...
fix `I::cases()` where `interface I extends BackedEnum`
2023-01-07 21:05:35 +01:00
Ryan Bonham
cb204edcdd
Correct Stubs for PHP 7 and PHP 8
2023-01-07 12:38:49 -05:00
Ryan Bonham
0d360419b7
Update Call Maps and Signature for get_headers
2023-01-06 19:24:00 -05:00
Rudolph Gottesheim
18e8dd9da1
Narrow down the return type of DOMXPath::query()
2023-01-06 16:19:48 +01:00
Bruce Weirdan
afb8c8891b
fix I::cases()
where interface I extends BackedEnum
...
Fixes vimeo/psalm#9065
Inheritance in stubs seems to be broken
2023-01-05 21:35:47 -04:00
Jaroslav Hanslík
65cf669bff
Fix ReflectionClass stub
2023-01-03 23:55:59 +01:00
orklah
e527c68706
Merge pull request #9051 from kukulich/patch-4
...
Fix `ReflectionClass::getTraitNames()` stub
2023-01-03 23:17:48 +01:00
orklah
f978594157
Merge pull request #9052 from kukulich/patch-5
...
Fix `ReflectionMethod::getModifiers()` stub
2023-01-03 23:17:09 +01:00
Jaroslav Hanslík
cbea438a23
Fix ReflectionFunctionAbstract::getExtensionName() stub
2023-01-03 22:16:58 +01:00
Jaroslav Hanslík
4f8f233e76
Fix ReflectionMethod::getModifiers() stub
2023-01-03 22:08:36 +01:00
Jaroslav Hanslík
2310c1361d
Fix ReflectionClass::getTraitNames() stub
2023-01-03 21:46:47 +01:00
orklah
3560ef7717
Merge pull request #9046 from kukulich/patch-1
...
Fix `ReflectionClass::getTraitAliases()` stub
2023-01-03 21:05:17 +01:00
orklah
7cde3c33d2
Merge pull request #9048 from kukulich/patch-3
...
Fix `ReflectionClass::getReflectionConstants()` stub
2023-01-03 21:04:49 +01:00
Jaroslav Hanslík
9ebefcef7d
Fix ReflectionClass::getReflectionConstants() stub
2023-01-03 18:20:08 +01:00
Jaroslav Hanslík
865a824818
Fix ReflectionClass::getModifiers() stub
2023-01-03 18:15:56 +01:00
Jaroslav Hanslík
415ef8fc75
Fix ReflectionClass::getTraitAliases() stub
2023-01-03 17:58:53 +01:00
orklah
790c30959d
Merge pull request #9016 from Ocramius/feature/#5039-more-refined-types-for-explode-core-function
...
Refined `explode()` types
2022-12-29 10:23:18 +01:00
Mark McEver
53c3f1ebb3
Prevent other DB escaping functions from escaping non-sql taints
2022-12-28 14:19:01 -06:00
Mark McEver
69f31dcd4a
Prevent mysqli escaping functions from escaping non-sql taints
2022-12-28 13:39:01 -06:00
Marco Pivetta
c0c0116809
Using list{0: string, 1?: string}
syntax for more precise array key types
...
Thanks to @orklah's feedback, the `explode()` return type is now much more precise too.
Ref: https://github.com/vimeo/psalm/pull/9016#discussion_r1058458616
2022-12-28 17:48:33 +01:00
Marco Pivetta
bfded43614
Ensure that explode($d, lowercase-string)
produces list<lowercase-string>
types
...
This specific distinction seems to be very important for Psalm, as `explode()` and
`lowercase-string` are used aggressively across the codebase.
Also, this change expands the baseline by a few entries, since some of the code locations
instide Psalm itself have un-checked list destructuring operations, as well as array
access calls on potentially undefined array keys produced by `explode()`, which were
previously just `list<string>`, and are now `array{0: string, 1?: string}`, which is
a bit more precise.
2022-12-28 17:26:25 +01:00