1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

215 Commits

Author SHA1 Message Date
Corey Taylor
b053253513 Fix signatures of ldap_* functions 2022-06-23 04:21:56 -05:00
Corey Taylor
07b335d068 Update ldap parameter to ldap_unbind in callmap 2022-06-20 06:59:36 -05:00
Benjamin Morel
d0cbf97e23 Add ReflectionClass::isEnum() 2022-06-17 16:42:21 +02:00
Alexandru Patranescu
4bafb96cee allow decimal_separator and thousands_separator parameters to be nullable in PHP 7 and 8 2022-06-15 07:43:04 +03:00
Sam Mousa
44b2ccb4b7
fix #8099: ob_implicit_flush argument type changed to bool 2022-06-13 12:44:43 +02:00
orklah
e72e4488fc
Merge pull request #8042 from KevinVanSonsbeek/bugfix/splfileobject-fputcsv-invalidnamedargument
Bugfix/splfileobject fputcsv invalidnamedargument
2022-06-02 18:41:52 +02:00
Kevin van Sonsbeek
1042ececaf Update the CallMap to have the correct param names 2022-06-02 00:30:58 +02:00
Vincent Langlet
087d7ce649 Update historical 2022-05-30 09:40:41 +03:00
Vincent Langlet
6352d9a855 Precise stat return type 2022-05-30 09:40:41 +03:00
Mathieu Rochette
e2aafdeab2
Improve array_unique callmap stubs
see #7956
2022-05-23 21:19:00 +02:00
Paul Fedorow
b2d357fbb8 Fix return type of ldap_search 2022-04-23 14:55:46 +02:00
Mikko Pesari
161a8ae6c4 Fix openssl_csr_export() signature 2022-04-13 17:47:59 +03:00
hirokinoue
c6d7bc0d19 Improve Throwable::getTrace() return type 2022-04-12 23:42:37 +09:00
Matthew Rardon
9c91912281 Fix ftp_fget/_fput/_nb_fget/_nb_fput arg types 2022-03-28 11:38:18 -04:00
Ciaran McNulty
0b39384325 Add return shape for Throwable::getTrace
This is based on the documentation for debug-backtrace:
   https://php.net/debug_backtrace

Experimentation that shows the `object` field is not populated for exceptions:
   https://3v4l.org/iQoni

And validation on psalm.dev:
   https://psalm.dev/r/b35a8df2f3
2022-03-18 09:14:23 +00:00
Jack Worman
88f9e19acd #7784 PDOStatement::fetchAll() has incorrect type 2022-03-14 14:11:31 -05:00
Ne-Lexa
a57bb1f128 fix #7747: DateInterval::createFromDateString can be false 2022-03-05 22:37:55 +03:00
orklah
3a85f49268
Merge pull request #7673 from VincentLanglet/pdoException
PDOException extends RuntimeException and can use int code errors
2022-02-23 13:45:57 +01:00
Vincent Langlet
694157b2e0 PDOException extends RuntimeException and can use int code errors 2022-02-14 21:04:10 +01:00
Chloé Kekoa
092f729e46 Correct name of ErrorException::__construct $line param 2022-02-13 01:19:33 +01:00
Marco Pivetta
fabcda16b4 Ensure trait_exists() always returns bool
Fixes #7478

As discussed in the upstream issue, `trait_exists()` always returns `bool`: while
it can return `null` when the arguments passed to it do not match (either no arguments, or
3 or more arguments), we do not support that scenario, as that already doesn't respect the
type signature of this function.

We cut to the point: always make it `bool`, which is the scenario that works under healthy
operational conditions.

Ref: https://github.com/Roave/BetterReflection/pull/983#discussion_r790908170
Ref: https://psalm.dev/r/c41a43805d
Ref: https://github.com/vimeo/psalm/issues/7478#issuecomment-1020330351
Ref: https://github.com/vimeo/psalm/issues/7478#issuecomment-1020337712
Ref: https://3v4l.org/XpHmh
2022-02-01 16:51:09 +01:00
Kevin van Sonsbeek
5a1ddf5e2d Fixed the return type in the callmap 2022-01-25 23:13:04 +01:00
Fabien Villepinte
6bf34b5b97 Add missing parameter to Phar::getMetadata() 2022-01-25 21:35:27 +01:00
Matthias Wirtz
5b23a0c51e
in array form all attributes are nullable since PHP 7.3 2022-01-22 15:34:16 +01:00
Matthias Wirtz
bb577ec271
change nullable for array signature to be equal to param signature 2022-01-22 15:26:26 +01:00
Alberto Piai
9b22d63c5b
fix proc_open stub for php >= 8.0
The argument names are defined here:

https://github.com/php/php-src/blob/PHP-8.0.0/ext/standard/basic_functions_arginfo.h#L1773-L1780
2022-01-20 13:57:34 +01:00
Rishi Kumar Ray
5e277d4060 Fix Incomplete return type for mb_split() function 2022-01-19 18:07:06 +05:30
5c3d9fd659
Fix kafka stubs 2022-01-19 10:14:09 +01:00
orklah
a0f52eae2f
Merge pull request #7407 from villfa/fix/7039
Improve signature of DOMDocument::loadXML()
2022-01-18 00:01:00 +01:00
Fabien Villepinte
c9eafa15ad Improve signature of DOMDocument::loadXML() 2022-01-17 22:52:58 +00:00
Fabien Villepinte
642321ea70 Improve signature of random_bytes() 2022-01-16 14:47:42 +01:00
Bruce Weirdan
f9e6ff39fa
Merge pull request #7347 from VincentLanglet/dir 2022-01-09 00:14:28 +02:00
Vincent Langlet
c03154390a Fix dir 2022-01-08 21:49:45 +01:00
Ricardo Boss
dc0e82f6bc Updated return type of iterator_count and iterator_apply functions to 0|positive-int 2022-01-07 12:36:07 +01:00
Rudolph Gottesheim
ed4c22044a uniqid() returns a non-empty-string 2022-01-03 11:51:36 +01:00
Matthias Wirtz
309d1a4634
add samesite option here as well 2021-12-27 09:46:58 +01:00
Francois Botha
014e678e97 MySqli: some parameters are nullable 2021-12-20 16:00:25 +02:00
orklah
646ba983a0
Merge pull request #7140 from yethee/soap
Fixed compatibility with SoapClient
2021-12-15 00:55:57 +01:00
orklah
2cd7b19ee3
Merge pull request #7145 from villfa/fix/ldap_set_rebind_proc
Fix ldap_set_rebind_proc signature
2021-12-15 00:49:50 +01:00
orklah
41fe5534b6
Merge pull request #7159 from AndrolGenhald/bugfix/number-format-optional-arguments
Fix optional arguments in number_format (fixes #7158).
2021-12-15 00:47:35 +01:00
AndrolGenhald
10b6b9aef0 Fix optional arguments in number_format (fixes #7158). 2021-12-14 09:10:05 -06:00
orklah
a51d16150d fix CI 2021-12-13 23:35:48 +01:00
yethee
3a574fe072
Update signatures for SoapFault 2021-12-13 22:14:09 +03:00
Fabien Villepinte
3bd9bbddc7 Fix ldap_set_rebind_proc signature 2021-12-13 11:06:31 +01:00
yethee
0897714964
Update signatures of methods of SoapClient 2021-12-12 19:43:06 +03:00
Kamil Tekiela
88ce10b1dc Fix count_chars stubs 2021-12-07 21:31:05 +00:00
Bruce Weirdan
142ee57836
Refine *strlen() return type to exclude negative integers
Fixes vimeo/psalm#7062
2021-12-05 03:57:36 +02:00
Kamil Tekiela
b854f436ff Improve count_chars stub 2021-12-04 20:56:17 +00:00
orklah
396ff967e0
Merge pull request #7042 from kamil-tekiela/get_class
get_class does not return false
2021-12-02 13:12:36 +01:00
orklah
90d421635d
Merge pull request #7030 from ostrolucky/rediscluster-getoption
Fix RedisCluster::getOption() and RedisCluster::setOption() argument types
2021-12-02 07:45:36 +01:00