#
e547ea43 |
| 22-Sep-2020 |
Nikita Popov |
http_build_query() cannot fail Assert that ht is not null and make php_url_encode_hash_ex() return void to clarify that this is an infallible function. |
#
0fbebfd1 |
| 22-Sep-2020 |
Nikita Popov |
html_entity_decode() cannot fail php_unescape_html_entities() never returns null, so this function can never return false. php_unescape_html_entities() probably should be failin
html_entity_decode() cannot fail php_unescape_html_entities() never returns null, so this function can never return false. php_unescape_html_entities() probably should be failing with OOM for the "overflow" case, but even if it did, it would not be signalled through a false return value.
show more ...
|
#
84be22f1 |
| 22-Sep-2020 |
Nikita Popov |
Validate phonemes parameter of metaphone() And thus avoid the false return value. |
#
d0fb2f40 |
| 22-Sep-2020 |
Nikita Popov |
substr_compare() cannot return false |
#
5d9ab53a |
| 22-Sep-2020 |
Nikita Popov |
Check string bounds in strspn/strcspn strspn/strcspn are string search functions, and as such should throw ValueError on out-of-bounds offsets, just like strpos etc do. |
#
ade57e69 |
| 22-Sep-2020 |
Nikita Popov |
substr_replace() cannot return false |
#
64af12d1 |
| 19-Sep-2020 |
Máté Kocsis |
Add support for `@implementation-alias` in stubs Closes GH-6170 |
#
46d22e43 |
| 16-Sep-2020 |
Máté Kocsis |
Change int parameter types to bool when the parameter behaves as bool Closes GH-6148 |
#
de912821 |
| 16-Sep-2020 |
Máté Kocsis |
Display string default values in stubs more uniformly Settling on using quoted string |
#
c76910cd |
| 16-Sep-2020 |
Máté Kocsis |
Display types in stubs more uniformly In preparation for generating method signatures for the manual. This change gets rid of bogus false|null return types, a few unnecessary traili
Display types in stubs more uniformly In preparation for generating method signatures for the manual. This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.
show more ...
|
#
c37a1cd6 |
| 10-Sep-2020 |
Máté Kocsis |
Promote a few remaining errors in ext/standard Closes GH-6110 |
#
96f2f317 |
| 26-Aug-2020 |
Larry Garfield |
Update array parameter names for named parameters * The array "subject" of a function gets called $array. * Further parameters should be self-descriptive if used as a named pa
Update array parameter names for named parameters * The array "subject" of a function gets called $array. * Further parameters should be self-descriptive if used as a named parameter, and a full word, not an abbreviation. * If there is a "bunch more arrays" variadic, it gets called $arrays (because that's what was already there). * A few functions have a variadic "a bunch more arrays, and then a callable", and were already called $rest. I left those as is and died a little inside. * Any callable provided to an array function that acts on the array is called $callback. (Nearly all were already, I just fixed the one or two outliers.) * array_multisort() is beyond help so I ran screaming.
show more ...
|
#
46c0c82a |
| 14-Sep-2020 |
Máté Kocsis |
Declare array|int and object-of-class|int types in stubs Closes GH-6081 Co-Authored-By: Nikita Popov <nikic@php.net> |
#
eb86d081 |
| 14-Sep-2020 |
Máté Kocsis |
Fix a few stub parameter types in ext/standard |
#
d37d2228 |
| 09-Sep-2020 |
Nikita Popov |
Make array_multisort() signature more variadic The second and third arguments are not always the sort_order and sort_flags -- they can also be in reverse order, or be arrays altogeth
Make array_multisort() signature more variadic The second and third arguments are not always the sort_order and sort_flags -- they can also be in reverse order, or be arrays altogether. Move them into the variadic parameter to avoid awkward error messages.
show more ...
|
#
73ab7b30 |
| 08-Sep-2020 |
Nikita Popov |
Allow array_diff() and array_intersect() with single array argument Both of these functions are well-defined when used with a single array argument -- rejecting this case was an artifici
Allow array_diff() and array_intersect() with single array argument Both of these functions are well-defined when used with a single array argument -- rejecting this case was an artificial limitation. This is not useful when called with explicit arguments, but removes edge-cases when used with argument unpacking: // OK even if $excludes is empty. array_diff($array, ...$excludes); // OK even if $arrays contains a single array only. array_intersect(...$arrays); This matches the behavior of functions like array_merge() and array_push(), which also allow calls with no array or a single array respectively. Closes GH-6097.
show more ...
|
#
9975986b |
| 16-Aug-2020 |
Máté Kocsis |
Improve error messages mentioning parameters instead of arguments Closes GH-5999 |
#
2c96780e |
| 20-Aug-2020 |
Máté Kocsis |
Fix UNKNOWN default values in ext/standard Closes GH-6026 |
#
032f8621 |
| 07-Sep-2020 |
Nikita Popov |
Drop support for crypt() without explicit salt crypt() without salt generates a weak $1$ MD5 hash. It has been throwing a notice since 2013 and we provide a much better alternative i
Drop support for crypt() without explicit salt crypt() without salt generates a weak $1$ MD5 hash. It has been throwing a notice since 2013 and we provide a much better alternative in password_hash() (which can auto-generate salts for strong password hashes), so keeping this is just a liability.
show more ...
|
#
8107a1da |
| 04-Sep-2020 |
Máté Kocsis |
Use ZPP instead of custom type checks We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068 |
#
9883fec9 |
| 18-Aug-2020 |
Tyson Andre |
Fix more basic function stubs User-defined functions can't have multiple parameters with the same name. Don't do that for var_dump/debug_zval_dump. Consistently use array $array
Fix more basic function stubs User-defined functions can't have multiple parameters with the same name. Don't do that for var_dump/debug_zval_dump. Consistently use array $array to match docs Fix typo in UPGRADING Fixes GH-6015
show more ...
|
#
dae83cd7 |
| 08-Jul-2020 |
George Peter Banyard |
Use ZPP callable check for Windows specific functions |
#
cb2f6897 |
| 13-Aug-2020 |
Máté Kocsis |
Fix param name in PHPDoc |
#
2803c8fb |
| 07-Aug-2020 |
Máté Kocsis |
Add all the missing parameter types to stubs Closes GH-5955 |
#
1e9a5c67 |
| 10-Aug-2020 |
Tyson Andre |
Rename standard array function parameters to $array This is targeting 8.0. `$arg` seems like a poor choice of a name, especially if the function were to have arguments added.
Rename standard array function parameters to $array This is targeting 8.0. `$arg` seems like a poor choice of a name, especially if the function were to have arguments added. In many cases, the php.net documentation already has $array for these functions. E.g. https://www.php.net/manual/en/function.array-intersect.php I'd assume that since named arguments was added to 8.0 near the feature freeze, PHP's maintainers had planned to make the names consistent and gradually use the same name for docs and implementation.
show more ...
|