Brown
690b29762e
ZipArchive::open can return true cc @LeSuisse
2020-04-04 17:45:26 -04:00
LeSuisse
3ecd6bbd00
Fix return type of \zip_open() ( #3046 )
...
This function can return an int [0] or false [1] in case of error.
The return value of ZipArchive has also been fixed, it returns either a
boolean or an int [2][3].
Close vimeo/psalm#3209 .
[0] https://github.com/php/php-src/blob/php-7.4.4/ext/zip/php_zip.c#L1176
[1] https://github.com/php/php-src/blob/php-7.4.4/ext/zip/php_zip.c#L1160
[3] https://github.com/php/php-src/blob/php-7.4.4/ext/zip/php_zip.c#L1483
[4] https://github.com/php/php-src/blob/php-7.4.4/ext/zip/php_zip.c#L1478
2020-04-01 17:12:45 -04:00
LeSuisse
6353b614fa
$ignore parameter of \sodium_base642bin() is optional ( #2997 )
...
https://github.com/php/php-src/blob/php-7.3.15/ext/sodium/libsodium.c#L2775
2020-03-20 21:09:45 -04:00
Matthew Brown
73badf59d1
Fix #2925 - ignore null return type for array_replace_recursive
2020-03-15 14:07:55 -04:00
Teemu Koskinen
1801420305
Most gd functions that output an image accept either a filename or a stream resource as the optional second parameter
...
The only exception is imagexbm, which only accepts a filename (and which is optional)
2020-02-20 13:47:47 -05:00
Brown
1c42875179
Support lowercase-string and warn about unnecessary calls to strtolower
2020-02-13 16:38:58 -05:00
Benjamin Morel
b486bd4c78
PDOStatement::fetchColumn() can return any scalar
2020-02-05 11:46:01 -05:00
Thomas Gerbet
6f6e26580a
Remove non-existent $serverctrls parameter for \ldap_bind()
...
In a8e58b0ba0
a `$serverctrls` parameter
was incorrectly added to the \ldap_bind() function.
See php/doc-en#20 .
2020-02-02 12:34:28 -05:00
Orklah
e48dc2d158
small stubs changes for reflection
2020-02-01 12:54:43 -05:00
Matthew Brown
4489b7169d
Allow possibly-false return for DOMDocument::saveXML
...
Fixes #2714
2020-01-29 21:03:34 -05:00
Matthew Brown
ff01f41b44
Allow strings in assert annotation
2020-01-27 23:15:50 -05:00
orklah
563032c5f2
List notation in callmap ( #2693 )
...
* improve multiple return types with list<> + Exception::getTrace details
* fix broken syntax
* seems like changing libxml_get_errors return type angered the CI God
* revert array_count_values
2020-01-27 09:13:15 -05:00
orklah
ef07e55deb
add list<> notation in stubs ( #2675 )
...
* add list<> notation in stubs
* change phpdoc to be compatible with expected list<>
* change interface phpdoc to be compatible with expected list<>
* revert array_chunk => special case to handle with preserve keys.
* change array_chunk return to match both behaviour
* revert list<> notation in parameters where not required
2020-01-24 13:17:36 -05:00
Alfred Bez
619ced135b
fixed RarArchive signatures ( #2641 )
2020-01-16 11:01:14 -05:00
Pavel Batečko
1b0eba74fd
Allow NULL $contextnode in DOMXPath::query() (again) ( #2637 )
2020-01-16 08:35:36 -05:00
Brown
df8f2085f0
Change constant type to be more forgiving
2020-01-14 18:39:15 -05:00
orklah
b09869b7c6
callmap changes ( #2612 )
...
* set_error_handler return the same type as its param
* a constant can only have scalars, array of scalars or null
* a constant can only have scalars, array of scalars or null
2020-01-14 16:55:25 -05:00
Brown
df8e3845e5
Fix #2590 - allow null argument for DateTime when no second arg passed
2020-01-10 15:53:15 -05:00
Matthew Brown
bc8952c793
Add Phan updates
2019-12-30 16:58:34 -05:00
Matthew Brown
b7fa15f89d
Port over updates from PHPStan
2019-12-30 15:55:15 -05:00
Matthew Brown
c14d1f7d7e
Fix order
2019-12-30 15:55:15 -05:00
Teemu Koskinen
447e3539af
ssh2-functions can return false on error, added missing parameters ( #2447 )
...
Source: http://git.php.net/?p=pecl/networking/ssh2.git;a=tree
2019-12-09 14:50:55 -05:00
Philip Hofstetter
528180998e
fix return type of stream_bucket_new ( #2434 )
...
the function returns `object` since 2003 in
php/php-src@c4a491e12c and
`stream_bucket_append()` is type hinted to take `object` too.
This fixes #2430
2019-12-07 14:04:18 -05:00
Pavel Batečko
dc78e9c57b
Update password function types for PHP 7.4 ( #2396 )
...
* Support NULL predefined constants
* Fix #2395 - update password_hash() and password_needs_rehash() types for PHP 7.4
* Change $fq_const_name check so it still uses isset
2019-11-29 09:30:01 -05:00
Alfred Bez
e2d1eca2b4
fixed RarArchive signatures ( #2385 )
2019-11-29 01:22:36 -05:00
Lars Strojny
9d32273029
Fix typo in InfiniteIterator type definition ( #2378 )
2019-11-26 14:20:40 -05:00
Takefumi Katsuren
da489d4b27
imagepng accepts resource at Argument 2 ( #2373 )
2019-11-24 20:15:05 -05:00
Brad Kent
6e6eea010b
callMap updates: unregister_tick_function, ReflectionClass::getInterfaceNames, ReflectionObject::getInterfaceNames ( #2258 )
2019-10-21 14:29:48 -04:00
Jay Klehr
27961045a0
allowing null as type for mysqli real_connect for host and passwd parameters ( #2210 )
2019-10-04 13:07:28 -04:00
Fabien Villepinte
e7faf81223
Fix the arguments order of rar_entry_get() ( #2189 )
2019-10-01 08:47:56 -04:00
LeSuisse
a8e58b0ba0
Fix signatures of \ldap_bind() and \ldap_bind_ext() ( #2122 )
...
Both functions accepts a null $bind_rdn parameter to do an
anonymous bind and they also accept a fourth optional
parameter.
References:
https://www.php.net/manual/en/function.ldap-bind.php
https://github.com/php/php-src/blob/php-7.3.9/ext/ldap/ldap.c#L1152
https://github.com/php/php-src/blob/php-7.3.9/ext/ldap/ldap.c#L1209
2019-09-11 12:01:53 -04:00
Fabien Villepinte
601827137a
Fix the signature of sodium_crypto_scalarmult_base() ( #2119 )
2019-09-10 18:11:15 -04:00
ADmad
da23c2e73a
Fix callmap for PDO::lastInsertId() ( #2092 )
2019-09-02 08:38:05 -04:00
Brown
9bd7f21a9d
Fix #2083 - don’t bludgeon method_exists first type
2019-08-29 14:27:25 -04:00
Brown
14584d6bae
Allow use without glue
2019-08-20 11:58:19 -04:00
Brown
32d5f0bb36
Remove accomodation for implode that’s deprecated in 7.4
...
Fixes #2036
2019-08-20 11:43:58 -04:00
Pavel Batečko
3e549e275b
Type $matches as an array if non-zero flags are passed to preg_match() ( #2022 )
...
* Type $matches as an array if non-zero flags are passed to preg_match()
* Add tests for preg_match() function call
2019-08-15 10:28:03 -04:00
Gert de Pagter
5b2f54bbcb
Allow setLocale to have 0 or null as parameters ( #1993 )
2019-08-09 08:41:28 -04:00
Matthew Brown
de932c4c18
Fix #1972 - improve understanding of how setcookie works
2019-07-28 16:40:35 -04:00
Pavel Batečko
90d020d6fc
Improve DOM extension types ( #1965 )
...
* Improve DOM extension types
* fixup! Improve DOM extension types
2019-07-23 22:53:31 -04:00
Matthew Brown
210a0fc98d
Fix #1950 - improve class_parents return
2019-07-17 08:52:05 -04:00
Matthew Brown
216d8ae4ab
Make signature more specific cc @SignpostMarv
2019-07-05 10:44:20 -04:00
Matthew Brown
aa3df3f7a5
Add better support for preg_replace_callback
2019-07-05 10:40:05 -04:00
vadim2991
8e8fb2c286
Fix cal_from_jd function return types ( #1890 )
2019-07-02 10:20:33 -04:00
Teemu Koskinen
93c605b120
ImagickDraw color set methods accept string in addition of ImagickPixel ( #1887 )
2019-07-01 09:49:19 -04:00
Matthew Brown
8f1ed61ccb
Fix #1876 - allow any bool input for microtime
2019-06-30 09:58:04 -04:00
Matthew Brown
fbd8faadaf
Fix #1792 - allow scalar for sprintf
2019-06-15 11:56:59 -04:00
Brown
6eecb46b34
Fix #1725 - mcrypt_get_cipher_name was incorrect
2019-06-03 10:35:16 -04:00
Jørn Åne
0420865f72
Mark passphrase in openssl as nullable ( #1718 )
2019-06-01 08:53:11 -04:00
Matthew Brown
e31cdf3be5
Fix #1701 - allow count to be called on SimpleXMLElement
2019-05-29 07:56:06 -04:00