Bruce Weirdan
11e60fa261
Merge branch '4.x' into upstream-master
2022-02-11 03:51:48 +02: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
Bruce Weirdan
963b41d317
Merge branch '4.x' into upstream-master
2022-01-30 00:32:12 +02:00
orklah
2966f1c9d4
Merge pull request #7107 from AndrolGenhald/feature/5482-load-extensions-based-on-composer-config
...
Enable extensions based on composer.json instead of those loaded at runtime (fixes #5482 ).
2022-01-28 18:45:52 +01:00
mal-tee
ee990ebff6
InternalTaintSinkMap: Add getimagesize as SSRF sink
2022-01-28 12:29:26 +01:00
AndrolGenhald
2fe4fc397c
Enable extensions based on composer.json instead of those loaded at runtime ( fixes #5482 ).
2022-01-27 16:30:14 -06:00
Kevin van Sonsbeek
6b59dd9c66
Made the nodeValue nullable as indicated by the docs.
2022-01-27 19:19:57 +01:00
orklah
9168cef2d4
Merge remote-tracking branch 'upstream/4.x' into upstream-master6
2022-01-26 21:06:25 +01:00
Kevin van Sonsbeek
7507274b1c
Fixed return type in the historical callmap, and the old state in the CallMap_80_delta.php
2022-01-26 18:02:27 +01:00
Kevin van Sonsbeek
5a1ddf5e2d
Fixed the return type in the callmap
2022-01-25 23:13:04 +01:00
Kevin van Sonsbeek
62d458bfe8
Added the change to the delta callmap for php 8.0
2022-01-25 23:12:52 +01:00
Fabien Villepinte
6bf34b5b97
Add missing parameter to Phar::getMetadata()
2022-01-25 21:35:27 +01:00
orklah
841d4f4429
improve support for enum_exists
2022-01-22 18:27:24 +01:00
orklah
af1888b631
Merge remote-tracking branch 'upstream/4.x' into upstream-master4
2022-01-22 17:48:42 +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
d39ccb50bf
unify argument names in historical and current CallMap for proc_open
...
Since before 8.0 the named arguments were not part of the interface, we
don't care about the intermediate steps of the proc_open definition. For
consistency, this makes the definition the same across all versions.
This also fixes the type for the `options` argument already in
CallMap_historical to be nullable.
The names of the arguments are now consistent across versions, while the
delta for 7.4 reflects the change of the `command` argument from
`string` to `string|array`.
2022-01-21 09:45:28 +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
477c0113c2
Merge remote-tracking branch 'upstream/4.x' into upstream-master3
2022-01-18 18:37:04 +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
Ricardo Boss
26dd4c5b8f
Try to provide literal int types when possible ( fixes #6966 ) ( #7071 )
...
* Fixed vimeo/psalm#6966
* Only accept >= 0 values for mode argument in round()
* Made round() only return float or literal float values and remove unneeded test
* Registered RoundReturnTypeProvider
* Updated cast analyzer to handle single string literal int values as literal ints
* Fixed psalm errors
* Fix invalid property accesses
* Addressed comments
* Added Tests
* Marked RoundReturnTypeProvider as internal
* Fixed CS
2022-01-16 21:33:04 +01:00
Fabien Villepinte
dd64326479
Update CallMap_historical too
2022-01-16 14:49:16 +01: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
925e5be808
Fix the return type of uniqid() in historical call map
2022-01-03 12:12:30 +01:00
Rudolph Gottesheim
ed4c22044a
uniqid() returns a non-empty-string
2022-01-03 11:51:36 +01:00
orklah
926a56a97c
Merge pull request #7230 from orklah/cleanup6
...
code grooming
2021-12-27 22:54:39 +01:00
orklah
3e29a3d961
unnecessary qualified names
2021-12-27 20:16:34 +01:00
Matthias Wirtz
309d1a4634
add samesite option here as well
2021-12-27 09:46:58 +01:00
Matthias Wirtz
2c93b4fe0e
add missing samesite array attribute
...
https://www.php.net/manual/en/function.session-set-cookie-params
When using the second signature, an associative array which may have any of the keys lifetime, path, domain, secure, httponly and samesite. The values have the same meaning as described for the parameters with the same name. The value of the samesite element should be either Lax or Strict. If any of the allowed options are not given, their default values are the same as the default values of the explicit parameters. If the samesite element is omitted, no SameSite cookie attribute is set.
2021-12-25 08:12:13 +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
orklah
5ddf5df10d
Merge pull request #7155 from rarila/partials-conversion-2
...
Convertion of partials to full imports
2021-12-15 00:39:20 +01:00
orklah
dcb5234b69
remove ReflectionMethod::isStatic and add ReflectionFunctionAbstract::isStatic in 8.1
2021-12-14 18:30:31 +01:00
AndrolGenhald
10b6b9aef0
Fix optional arguments in number_format ( fixes #7158 ).
2021-12-14 09:10:05 -06:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01: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
53855f19b0
Update ldap_set_rebind_proc in Callmap_historical
2021-12-13 13:02:56 +01: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