Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,24 @@ PHP NEWS

- Posix:
. Added validity check to the flags argument for posix_access(). (arshidkv12)
. Added validity check to the permissions argument for posix_mkfifo(). (arshidkv12)
. Added validity check to the permissions argument for posix_mkfifo().
(arshidkv12)

- Reflection:
. Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true
for classes with property hooks). (alexandre-daubois)

- Soap:
. Soap::__setCookie() when cookie name is a digit is now not stored and represented
as a string anymore but a int. (David Carlier)
. Soap::__setCookie() when cookie name is a digit is now not stored and
represented as a string anymore but a int. (David Carlier)

- Sockets:
. Added the TCP_USER_TIMEOUT constant for Linux to set the maximum time in milliseconds
transmitted data can remain unacknowledged. (James Lucas)
. Added the TCP_USER_TIMEOUT constant for Linux to set the maximum time in
milliseconds transmitted data can remain unacknowledged. (James Lucas)
. Added AF_UNSPEC support for sock_addrinfo_lookup() as a sole umbrella for
AF_INET* family only. (David Carlier)
. Fixed GH-20532 (socket_addrinfo_lookup gives the error code with a new optional
parameter). (David Carlier)
. Fixed GH-20532 (socket_addrinfo_lookup gives the error code with a new
optional parameter). (David Carlier)

- SPL:
. DirectoryIterator key can now work better with filesystem supporting larger
Expand Down
17 changes: 12 additions & 5 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ PHP 8.6 UPGRADE NOTES
. finfo_file() now works with remote streams.

- Intl:
. Added IntlNumberRangeFormatter class to format an interval of two numbers with a given skeleton, locale, IntlNumberRangeFormatter::COLLAPSE_AUTO, IntlNumberRangeFormatter::COLLAPSE_NONE, IntlNumberRangeFormatter::COLLAPSE_UNIT, IntlNumberRangeFormatter::COLLAPSE_ALL collapse and
IntlNumberRangeFormatter::IDENTITY_FALLBACK_SINGLE_VALUE, IntlNumberRangeFormatter::IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE, IntlNumberRangeFormatter::IDENTITY_FALLBACK_APPROXIMATELY and
. Added IntlNumberRangeFormatter class to format an interval of two numbers
with a given skeleton, locale, IntlNumberRangeFormatter::COLLAPSE_AUTO,
IntlNumberRangeFormatter::COLLAPSE_NONE,
IntlNumberRangeFormatter::COLLAPSE_UNIT,
IntlNumberRangeFormatter::COLLAPSE_ALL collapse and
IntlNumberRangeFormatter::IDENTITY_FALLBACK_SINGLE_VALUE,
IntlNumberRangeFormatter::IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE,
IntlNumberRangeFormatter::IDENTITY_FALLBACK_APPROXIMATELY and
IntlNumberRangeFormatter::IDENTITY_FALLBACK_RANGE identity fallbacks.
It is supported from icu 63.

Expand Down Expand Up @@ -106,7 +112,8 @@ PHP 8.6 UPGRADE NOTES
========================================

- Standard:
. `clamp()` returns the given value if in range, else return the nearest bound.
. `clamp()` returns the given value if in range, else return the nearest
bound.
RFC: https://wiki.php.net/rfc/clamp_v2

========================================
Expand Down Expand Up @@ -189,8 +196,8 @@ PHP 8.6 UPGRADE NOTES

- Core:
. `printf()` using only `%s` and `%d` will be compiled into the equivalent
string interpolation, avoiding the overhead of a function call and repeatedly
parsing the format string.
string interpolation, avoiding the overhead of a function call and
repeatedly parsing the format string.
. Arguments are now passed more efficiently to known constructors (e.g. when
using new self()).
. array_map() using a first-class callable or partial function application
Expand Down
20 changes: 11 additions & 9 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,21 @@ PHP 8.6 INTERNALS UPGRADE NOTES

. build/gen_stub.php may now generate a _decl.h file in addition to
the _arginfo.h file, if the stub declares enums and is annotated with
@generate-c-enums. For each enum the file will contain a C enum. Enum values
can be compared to the result of zend_enum_fetch_case_id(zend_object*).
@generate-c-enums. For each enum the file will contain a C enum. Enum
values can be compared to the result of
zend_enum_fetch_case_id(zend_object*).

========================
3. Module changes
========================

- ext/xml:
. Removed the XML_ExpatVersion() libxml compatibility wrapper,
as it was unused.
. Removed the XML_GetCurrentByteCount() libxml compatibility wrapper,
as it was unused and could return the wrong result.

- ext/mbstring:
. Added GB18030-2022 to default encoding list for zh-CN.

- ext/mysqlnd:
. Dropped session_options parameter from all methods in mysqlnd_auth.
The same information is present in conn->options and should be used instead.
The same information is present in conn->options and should be used
instead.

- ext/session:
. php_session_flush() now returns a bool rather than a zend_result.
Expand All @@ -111,6 +107,12 @@ PHP 8.6 INTERNALS UPGRADE NOTES
. _php_error_log_ex() has been removed.
. php_mail()'s extra_cmd parameter is now a zend_string*.

- ext/xml:
. Removed the XML_ExpatVersion() libxml compatibility wrapper,
as it was unused.
. Removed the XML_GetCurrentByteCount() libxml compatibility wrapper,
as it was unused and could return the wrong result.

========================
4. OpCode changes
========================
Expand Down
2 changes: 1 addition & 1 deletion ext/sockets/conversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void from_zval_write_sin6_addr(const zval *zaddr_str, char *addr6, ser_co
} else {
/* error already emitted, but let's emit another more relevant */
do_from_zval_err(ctx, "could not resolve address '%s' to get an AF_INET6 "
"address", Z_STRVAL_P(zaddr_str));
"address", ZSTR_VAL(addr_str));
}

zend_tmp_string_release(tmp_addr_str);
Expand Down
19 changes: 19 additions & 0 deletions ext/sockets/tests/gh21161.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
GH-21161 (IPV6_PKTINFO socket option crash with null addr array entry)
--EXTENSIONS--
sockets
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. Not valid for Windows');
}
?>
--FILE--
<?php
$sock = socket_create(AF_INET6, SOCK_DGRAM, 0);
socket_set_option($sock, IPPROTO_IPV6, IPV6_PKTINFO, ['addr' => null, 'ifindex' => 0]);
?>
--EXPECTF--
Warning: socket_set_option(): Host lookup failed [%i]: %s on line %d

Warning: socket_set_option(): error converting user data (path: in6_pktinfo > addr): could not resolve address '' to get an AF_INET6 address in %s on line %d