Skip to content

Commit abdad17

Browse files
authored
Merge branch 'php:master' into master
2 parents 22aef08 + e84320a commit abdad17

File tree

283 files changed

+6859
-2140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+6859
-2140
lines changed

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@
469469
- 'ext/pdo/php_pdo.h'
470470
- 'ext/pdo/php_pdo_driver.h'
471471
- 'ext/pdo/php_pdo_error.h'
472-
- 'ext/phar/php_phar.h'
473472
- 'ext/random/php_random.h'
474473
- 'ext/random/php_random_csprng.h'
475474
- 'ext/random/php_random_uint128.h'

EXTENSIONS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ MAINTENANCE: Maintained
196196
STATUS: Working
197197
-------------------------------------------------------------------------------
198198
EXTENSION: lexbor
199-
PRIMARY MAINTAINER: Niels Dossche <[email protected]> (2023 - 2025)
199+
PRIMARY MAINTAINER: Niels Dossche <[email protected]> (2025 - 2025)
200200
Mate Kocsis <[email protected]> (2025 - 2025)
201201
MAINTENANCE: Maintained
202202
STATUS: Working

NEWS

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? ????, PHP 8.5.0alpha1
3+
?? ??? ????, PHP 8.5.0alpha3
4+
5+
- Sockets:
6+
. socket_set_option for multicast context throws a ValueError
7+
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)
8+
9+
- URI:
10+
. Empty host handling is fixed. (Máté Kocsis)
11+
. Error handling of Uri\WhatWg\Url::withHost() is fixed when the input
12+
contains a port. Now, it triggers an exception; previously, the error
13+
was silently swallowed. (Máté Kocsis)
14+
15+
17 Jul 2025, PHP 8.5.0alpha2
16+
17+
- Core:
18+
. Fix OSS-Fuzz #427814452 (pipe compilation fails with assert).
19+
(nielsdos, ilutov)
20+
21+
- DOM:
22+
. Make cloning DOM node lists, maps, and collections fail. (nielsdos)
23+
. Added Dom\Element::getElementsByClassName(). (nielsdos)
24+
25+
- PDO_ODBC
26+
. Fetch larger block sizes and better handle SQL_NO_TOTAL when calling
27+
SQLGetData. (Calvin Buckley, Saki Takamachi)
28+
29+
- Standard:
30+
. Optimized pack(). (nielsdos, divinity76)
31+
. Fixed bug GH-19070 (setlocale($type, NULL) should not be deprecated).
32+
(nielsdos)
33+
34+
- URI:
35+
. Return the singleton UrlValidationErrorType instances from Uri\WhatWg\Url
36+
instead of creating new objects that are different from the singleton.
37+
(timwolla)
38+
39+
03 Jul 2025, PHP 8.5.0alpha1
440

541
- BCMath:
642
. Simplify `bc_divide()` code. (SakiTakamachi)
@@ -60,6 +96,8 @@ PHP NEWS
6096
(DanielEScherzer)
6197
. Do not use RTLD_DEEPBIND if dlmopen is available. (Daniil Gentili)
6298
. Make `clone()` a function. (timwolla, edorian)
99+
. Fixed bug GH-19081 (Wrong lineno in property error with constructor property
100+
promotion). (ilutov)
63101

64102
- Curl:
65103
. Added curl_multi_get_handles(). (timwolla)
@@ -132,6 +170,11 @@ PHP NEWS
132170
. Log a warning when opcache lock file permissions could not be changed.
133171
(Taavi Eomäe)
134172

173+
- OpenSSL:
174+
. Added openssl.libctx INI that allows to select the OpenSSL library context
175+
type and convert verious parts of the extension to use the custom libctx.
176+
(Jakub Zelenka)
177+
135178
- Output:
136179
. Fixed calculation of aligned buffer size. (cmb)
137180

UPGRADING

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ PHP 8.5 UPGRADE NOTES
4545
change, but should more closely match user expectations, demonstrated by
4646
GH-15753 and GH-16198.
4747

48+
- DOM:
49+
. Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList,
50+
Dom\HTMLCollection, and Dom\DtdNamedNodeMap now fails.
51+
This never actually resulted in a working object,
52+
so the impact should actually be zero.
53+
4854
- FileInfo:
4955
. finfo_file() and finfo::file() now throws a ValueError instead of a
5056
TypeError when $filename contains nul bytes.
@@ -264,6 +270,19 @@ PHP 8.5 UPGRADE NOTES
264270
4. Deprecated Functionality
265271
========================================
266272

273+
- Core:
274+
. Returning a non-string from a user output handler is deprecated. The
275+
deprecation warning will bypass the handler with the bad return to ensure
276+
it is visible; if there are nested output handlers the next one will still
277+
be used.
278+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
279+
. Trying to produce output (e.g. with `echo`) within a user output handler
280+
is deprecated. The deprecation warning will bypass the handler producing the
281+
output to ensure it is visible; if there are nested output handlers the next
282+
one will still be used. If a user output handler returns a non-string and
283+
produces output, the warning about producing an output is emitted first.
284+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
285+
267286
- Hash:
268287
. The MHASH_* constants have been deprecated. These have been overlooked
269288
when the mhash*() function family has been deprecated per
@@ -357,6 +376,8 @@ PHP 8.5 UPGRADE NOTES
357376
. socket_create/socket_bind can create AF_PACKET family sockets.
358377
. socket_getsockname gets the interface index and its string
359378
representation with AF_PACKET socket.
379+
. socket_set_option with multicast context throws a ValueError
380+
when the created socket is not of AF_INET/AF_INET6 family.
360381

361382
- Tidy:
362383
. tidy::__construct/parseFile/parseString now throws a ValueError
@@ -394,6 +415,7 @@ PHP 8.5 UPGRADE NOTES
394415
RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
395416

396417
- DOM:
418+
. Added Dom\Element::getElementsByClassName().
397419
. Added Dom\Element::insertAdjacentHTML().
398420

399421
- Enchant:
@@ -443,6 +465,13 @@ PHP 8.5 UPGRADE NOTES
443465
across multiple PHP requests.
444466
RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
445467

468+
- URI:
469+
. Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode,
470+
Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException,
471+
Uri\WhatWg\UrlValidationErrorType, Uri\WhatWg\UrlValidationError,
472+
and Uri\WhatWg\Url are added.
473+
RFC: https://wiki.php.net/rfc/url_parsing_api
474+
446475
========================================
447476
8. Removed Extensions and SAPIs
448477
========================================
@@ -466,6 +495,11 @@ PHP 8.5 UPGRADE NOTES
466495
library that was separated from ext/dom for being reused among other
467496
extensions. The new extension is not directly exposed to userland.
468497

498+
- URI:
499+
. An always enabled uri extension is added that can be used for handling
500+
URIs and URLs according to RFC 3986 and WHATWG URL.
501+
RFC: https://wiki.php.net/rfc/url_parsing_api
502+
469503
- PCRE:
470504
. Upgraded to pcre2lib from 10.44 to 10.45.
471505

@@ -544,6 +578,11 @@ PHP 8.5 UPGRADE NOTES
544578
from being a multiple of loop iteration counts.
545579
It is recommended that this parameter is set to a prime number.
546580

581+
- OpenSSL:
582+
Added openssl.libctx to select the OpenSSL library context type. Either
583+
custom libctx for each thread can be used or a single global (default)
584+
libctx is used.
585+
547586
========================================
548587
12. Windows Support
549588
========================================
@@ -592,6 +631,13 @@ PHP 8.5 UPGRADE NOTES
592631
. The `-z` or `--zend-extension` option has been removed as it was
593632
non-functional. Use `-d zend_extension=<path>` instead.
594633

634+
- PDO_ODBC
635+
. The fetch behaviour for larger columns has been changed. Rather than
636+
fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size;
637+
currently, this is the page size minus string overhead. Drivers that
638+
return SQL_NO_TOTAL in SQLGetData are also better handled as well.
639+
This should improve compatibility and performance. See GH-10809, GH-10733.
640+
595641
========================================
596642
14. Performance Improvements
597643
========================================
@@ -625,6 +671,7 @@ PHP 8.5 UPGRADE NOTES
625671
. Improved performance of urlencode() and rawurlencode().
626672
. Improved unpack() performance with nameless repetitions by avoiding
627673
creating temporary strings and reparsing them.
674+
. Improved pack() performance.
628675

629676
- XMLReader:
630677
. Improved property access performance.

UPGRADING.INTERNALS

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,29 @@ PHP 8.5 INTERNALS UPGRADE NOTES
4343
. Added the zend_update_exception_properties() function for instantiating
4444
Exception child classes. It updates the $message, $code, and $previous
4545
properties.
46+
. zend_exception_get_default() was removed, use zend_ce_exception directly.
47+
. zend_get_error_exception() was removed, use zend_ce_error_exception
48+
directly.
4649
. ZEND_IS_XDIGIT() macro was removed because it was unused and its name
4750
did not match its actual behavior.
51+
. The following zend_string-related legacy aliases were removed:
52+
* IS_INTERNED() - use ZSTR_IS_INTERNED()
53+
* STR_EMPTY_ALLOC() - use ZSTR_EMPTY_ALLOC()
54+
* _STR_HEADER_SIZE - use _ZSTR_HEADER_SIZE
55+
* STR_ALLOCA_ALLOC() - use ZSTR_ALLOCA_ALLOC()
56+
* STR_ALLOCA_INIT() - use ZSTR_ALLOCA_INIT()
57+
* STR_ALLOCA_FREE() - use ZSTR_ALLOCA_FREE()
4858
. zend_register_constant() now returns a pointer to the added constant
4959
on success and NULL on failure instead of SUCCESS/FAILURE.
60+
The specialized registration methods that previously had void returns
61+
also return pointers to the added constants:
62+
* zend_register_bool_constant()
63+
* zend_register_null_constant()
64+
* zend_register_long_constant()
65+
* zend_register_double_constant()
66+
* zend_register_string_constant()
67+
* zend_register_stringl_constant()
68+
. EG(fake_scope) now is a _const_ zend_class_entry*.
5069

5170
========================
5271
2. Build system changes
@@ -57,7 +76,7 @@ PHP 8.5 INTERNALS UPGRADE NOTES
5776
. Preprocessor macro SIZEOF_INTMAX_T has been removed.
5877

5978
- Windows build system changes
60-
. SAPI() and ADD_SOURCES() now suport the optional `duplicate_sources`
79+
. SAPI() and ADD_SOURCES() now support the optional `duplicate_sources`
6180
parameter. If truthy, no rules to build the object files are generated.
6281
This allows to build additional variants of SAPIs (e.g. a DLL and EXE)
6382
without duplicate build rules. It is up to the SAPI maintainers to ensure
@@ -72,11 +91,14 @@ PHP 8.5 INTERNALS UPGRADE NOTES
7291
. Autoconf macro PHP_AP_EXTRACT_VERSION has been removed.
7392
. Autoconf macro PHP_BUILD_THREAD_SAFE has been removed (set enable_zts
7493
manually).
94+
. Autoconf macro PHP_CHECK_SIZEOF is obsolete (use AC_CHECK_SIZEOF).
7595
. Autoconf macro PHP_DEF_HAVE has been removed (use AC_DEFINE).
7696
. Autoconf macro PHP_OUTPUT has been removed (use AC_CONFIG_FILES).
7797
. Autoconf macro PHP_TEST_BUILD has been removed (use AC_* macros).
7898
. Preprocessor macro HAVE_PTRDIFF_T has been removed.
7999
. Preprocessor macro HAVE_INTMAX_T has been removed.
100+
. Preprocessor macro HAVE_SSIZE_T has been removed.
101+
. Preprocessor macro SIZEOF_SSIZE_T has been removed.
80102

81103
========================
82104
3. Module changes

Zend/Optimizer/zend_func_infos.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ static const func_info_t func_infos[] = {
131131
F1("imagecreatefromgd", MAY_BE_OBJECT|MAY_BE_FALSE),
132132
F1("imagecreatefromgd2", MAY_BE_OBJECT|MAY_BE_FALSE),
133133
F1("imagecreatefromgd2part", MAY_BE_OBJECT|MAY_BE_FALSE),
134-
#if defined(HAVE_GD_BMP)
135134
F1("imagecreatefrombmp", MAY_BE_OBJECT|MAY_BE_FALSE),
136-
#endif
137135
F1("imagecolorsforindex", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG),
138136
F1("imagegetclip", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG),
139137
#if defined(HAVE_GD_FREETYPE)

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ static const zend_property_info *lookup_prop_info(const zend_class_entry *ce, ze
24092409
/* If the class is linked, reuse the precise runtime logic. */
24102410
if ((ce->ce_flags & ZEND_ACC_LINKED)
24112411
&& (!scope || (scope->ce_flags & ZEND_ACC_LINKED))) {
2412-
zend_class_entry *prev_scope = EG(fake_scope);
2412+
const zend_class_entry *prev_scope = EG(fake_scope);
24132413
EG(fake_scope) = scope;
24142414
prop_info = zend_get_property_info(ce, name, 1);
24152415
EG(fake_scope) = prev_scope;

Zend/Zend.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ AC_CHECK_FUNCS(m4_normalize([
149149
pthread_get_stackaddr_np
150150
pthread_getattr_np
151151
pthread_stackseg_np
152+
strnlen
152153
]))
153154
154155
AC_CHECK_DECL([clock_gettime_nsec_np],

Zend/tests/closures/closure_016.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Foo::__invoke
4242
bool(true)
4343
Foo::__invoke
4444
bool(true)
45-
Closure::__invoke
45+
{closure:foo():9}
4646
bool(true)
47-
Closure::__invoke
47+
{closure:foo():9}
4848
bool(true)
4949
Closure::__invoke
5050
bool(true)

Zend/tests/concat/bug79836.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $counter = 0;
88
ob_start(function ($buffer) use (&$c, &$counter) {
99
$c = 0;
1010
++$counter;
11+
return '';
1112
}, 1);
1213
$c .= [];
1314
$c .= [];

0 commit comments

Comments
 (0)