Skip to content

Commit d5b7a74

Browse files
authored
Merge branch 'php:master' into true-async-api
2 parents 5822582 + ea9a7b2 commit d5b7a74

File tree

282 files changed

+6998
-2051
lines changed

Some content is hidden

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

282 files changed

+6998
-2051
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'

.github/workflows/nightly.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ on:
3232
windows_version:
3333
required: true
3434
type: string
35+
vs_crt_version:
36+
required: true
37+
type: string
3538
skip_laravel:
3639
required: true
3740
type: boolean
@@ -1034,7 +1037,7 @@ jobs:
10341037
PHP_BUILD_OBJ_DIR: C:\obj
10351038
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
10361039
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
1037-
PHP_BUILD_CRT: ${{ inputs.windows_version == '2022' && 'vs17' || 'vs16' }}
1040+
PHP_BUILD_CRT: ${{ inputs.vs_crt_version }}
10381041
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
10391042
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
10401043
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
6161
|| '22.04' }}
6262
windows_version: '2022'
63+
vs_crt_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) && 'vs17') || 'vs16' }}
6364
skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6465
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6566
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}

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: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
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+
17 Jul 2025, PHP 8.5.0alpha2
10+
11+
- Core:
12+
. Fix OSS-Fuzz #427814452 (pipe compilation fails with assert).
13+
(nielsdos, ilutov)
14+
15+
- DOM:
16+
. Make cloning DOM node lists, maps, and collections fail. (nielsdos)
17+
. Added Dom\Element::getElementsByClassName(). (nielsdos)
18+
19+
- PDO_ODBC
20+
. Fetch larger block sizes and better handle SQL_NO_TOTAL when calling
21+
SQLGetData. (Calvin Buckley, Saki Takamachi)
22+
23+
- Standard:
24+
. Optimized pack(). (nielsdos, divinity76)
25+
. Fixed bug GH-19070 (setlocale($type, NULL) should not be deprecated).
26+
(nielsdos)
27+
28+
- URI:
29+
. Return the singleton UrlValidationErrorType instances from Uri\WhatWg\Url
30+
instead of creating new objects that are different from the singleton.
31+
(timwolla)
32+
33+
03 Jul 2025, PHP 8.5.0alpha1
434

535
- BCMath:
636
. Simplify `bc_divide()` code. (SakiTakamachi)
@@ -60,6 +90,8 @@ PHP NEWS
6090
(DanielEScherzer)
6191
. Do not use RTLD_DEEPBIND if dlmopen is available. (Daniil Gentili)
6292
. Make `clone()` a function. (timwolla, edorian)
93+
. Fixed bug GH-19081 (Wrong lineno in property error with constructor property
94+
promotion). (ilutov)
6395

6496
- Curl:
6597
. Added curl_multi_get_handles(). (timwolla)
@@ -132,6 +164,11 @@ PHP NEWS
132164
. Log a warning when opcache lock file permissions could not be changed.
133165
(Taavi Eomäe)
134166

167+
- OpenSSL:
168+
. Added openssl.libctx INI that allows to select the OpenSSL library context
169+
type and convert verious parts of the extension to use the custom libctx.
170+
(Jakub Zelenka)
171+
135172
- Output:
136173
. Fixed calculation of aligned buffer size. (cmb)
137174

UPGRADING

Lines changed: 35 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.
@@ -259,6 +265,19 @@ PHP 8.5 UPGRADE NOTES
259265
4. Deprecated Functionality
260266
========================================
261267

268+
- Core:
269+
. Returning a non-string from a user output handler is deprecated. The
270+
deprecation warning will bypass the handler with the bad return to ensure
271+
it is visible; if there are nested output handlers the next one will still
272+
be used.
273+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
274+
. Trying to produce output (e.g. with `echo`) within a user output handler
275+
is deprecated. The deprecation warning will bypass the handler producing the
276+
output to ensure it is visible; if there are nested output handlers the next
277+
one will still be used. If a user output handler returns a non-string and
278+
produces output, the warning about producing an output is emitted first.
279+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
280+
262281
- Hash:
263282
. The MHASH_* constants have been deprecated. These have been overlooked
264283
when the mhash*() function family has been deprecated per
@@ -352,6 +371,8 @@ PHP 8.5 UPGRADE NOTES
352371
. socket_create/socket_bind can create AF_PACKET family sockets.
353372
. socket_getsockname gets the interface index and its string
354373
representation with AF_PACKET socket.
374+
. socket_set_option with multicast context throws a ValueError
375+
when the created socket is not of AF_INET/AF_INET6 family.
355376

356377
- Tidy:
357378
. tidy::__construct/parseFile/parseString now throws a ValueError
@@ -389,6 +410,7 @@ PHP 8.5 UPGRADE NOTES
389410
RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
390411

391412
- DOM:
413+
. Added Dom\Element::getElementsByClassName().
392414
. Added Dom\Element::insertAdjacentHTML().
393415

394416
- Enchant:
@@ -538,6 +560,11 @@ PHP 8.5 UPGRADE NOTES
538560
from being a multiple of loop iteration counts.
539561
It is recommended that this parameter is set to a prime number.
540562

563+
- OpenSSL:
564+
Added openssl.libctx to select the OpenSSL library context type. Either
565+
custom libctx for each thread can be used or a single global (default)
566+
libctx is used.
567+
541568
========================================
542569
12. Windows Support
543570
========================================
@@ -586,6 +613,13 @@ PHP 8.5 UPGRADE NOTES
586613
. The `-z` or `--zend-extension` option has been removed as it was
587614
non-functional. Use `-d zend_extension=<path>` instead.
588615

616+
- PDO_ODBC
617+
. The fetch behaviour for larger columns has been changed. Rather than
618+
fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size;
619+
currently, this is the page size minus string overhead. Drivers that
620+
return SQL_NO_TOTAL in SQLGetData are also better handled as well.
621+
This should improve compatibility and performance. See GH-10809, GH-10733.
622+
589623
========================================
590624
14. Performance Improvements
591625
========================================
@@ -619,6 +653,7 @@ PHP 8.5 UPGRADE NOTES
619653
. Improved performance of urlencode() and rawurlencode().
620654
. Improved unpack() performance with nameless repetitions by avoiding
621655
creating temporary strings and reparsing them.
656+
. Improved pack() performance.
622657

623658
- XMLReader:
624659
. 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],

0 commit comments

Comments
 (0)