Skip to content

Commit c43ea45

Browse files
committed
Merge remote-tracking branch 'php/master' into embed-req-cli
2 parents 0ff9e36 + f77523b commit c43ea45

114 files changed

Lines changed: 1405 additions & 650 deletions

File tree

Some content is hidden

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

.github/matrix.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
127127
$test_arm = version_compare($php_version, '8.4', '>=');
128128
$jobs['MACOS']['matrix'] = $all_variations
129129
? ['arch' => $test_arm ? ['X64', 'ARM64'] : ['X64'], 'debug' => [true, false], 'zts' => [true, false]]
130-
: ['include' => [['arch' => $test_arm ? 'ARM64' : 'X64', 'debug' => true, 'zts' => false, 'jit' => true]]];
131-
if ($all_variations) {
132-
// Set the jit variable on X64 jobs
133-
$jobs['MACOS']['matrix']['include'][] = ['arch' => 'X64', 'jit' => true];
134-
if ($test_arm) {
135-
// Set the jit variable on ARM64 NTS jobs
136-
$jobs['MACOS']['matrix']['include'][] = ['arch' => 'ARM64', 'zts' => false, 'jit' => true];
137-
// Set the jit variable on ARM64 ZTS jobs on 8.6+
138-
if (version_compare($php_version, '8.6', '>=')) {
139-
$jobs['MACOS']['matrix']['include'][] = ['arch' => 'ARM64', 'zts' => true, 'jit' => true];
140-
}
141-
}
142-
}
130+
: ['include' => [['arch' => $test_arm ? 'ARM64' : 'X64', 'debug' => true, 'zts' => false]]];
143131
$jobs['MACOS']['config']['arm64_version'] = version_compare($php_version, '8.4', '>=') ? '15' : '14';
144132
}
145133
if ($all_jobs || $test_msan) {

.github/workflows/test-suite.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,18 +345,18 @@ jobs:
345345
if: ${{ inputs.all_variations }}
346346
uses: ./.github/actions/test-macos
347347
- name: Test Tracing JIT
348-
if: ${{ matrix.jit }}
348+
if: ${{ matrix.arch == 'X64' || !matrix.zts }}
349349
uses: ./.github/actions/test-macos
350350
with:
351351
enableOpcache: true
352352
jitType: tracing
353353
- name: Test OpCache
354-
if: ${{ inputs.all_variations }}
354+
if: ${{ inputs.all_variations || (matrix.arch == 'ARM64' && matrix.zts) }}
355355
uses: ./.github/actions/test-macos
356356
with:
357357
enableOpcache: true
358358
- name: Test Function JIT
359-
if: ${{ inputs.all_variations && matrix.jit }}
359+
if: ${{ inputs.all_variations && (matrix.arch == 'X64' || !matrix.zts) }}
360360
uses: ./.github/actions/test-macos
361361
with:
362362
enableOpcache: true
@@ -573,6 +573,10 @@ jobs:
573573
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
574574
# Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
575575
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("public function testCastNonTrailingCharPointer()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
576+
# Causes massive amounts of system calls with USE_ZEND_ALLOC=0, exceeding the timeout
577+
if [ -e 'src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php' ]; then
578+
php -r '$c = file_get_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php"); $c = str_replace("public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", $c); file_put_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php", $c);'
579+
fi
576580
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
577581
X=0
578582
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do

NEWS

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ PHP NEWS
66
. Implemented partial function application RFC. (Arnaud)
77
. Fixed bug GH-22263 (reset typed property default on every unserialize
88
failure path). (David Carlier)
9+
. Fixed bug GH-18985 (Wrong line numbers for match with constant arms).
10+
(ilutov)
11+
. Fixed bug GH-18847 (SEGV in zend_fetch_debug_backtrace() when the memory
12+
limit is reached while the tracing JIT enters a call frame). (Arnaud,
13+
iliaal)
914

1015
- DOM:
1116
. Fixed bug GH-22825 (DOMElement::setAttribute() fails silently when the DTD
@@ -22,6 +27,7 @@ PHP NEWS
2227
- Intl:
2328
. Fixed grammatical issues in Normalizer invalid form and IntlCalendar time
2429
zone offset error messages. (Weilin Du)
30+
. Removed the dependency on the ICU IO library. (Weilin Du)
2531

2632
- ODBC:
2733
. Fixed bug GH-22668 (Heap buffer over-read when a column value exceeds the
@@ -38,6 +44,10 @@ PHP NEWS
3844
. Fixed bug GH-22665 (Out-of-bounds write when the ODBC driver reports a
3945
diagnostic message length beyond the error buffer). (iliaal)
4046

47+
- Phar:
48+
. Fixed grammatical issues and outdated terminology in Phar error messages.
49+
(Weilin Du)
50+
4151
- Reflection:
4252
. Fixed bug GH-22681 (Reflection*::__toString() truncates on null bytes).
4353
(DanielEScherzer)
@@ -59,6 +69,10 @@ PHP NEWS
5969
. Added a new IO copy API used by php_stream_copy_to_stream_ex() that
6070
leverages platform primitives (sendfile, splice, copy_file_range,
6171
TransmitFile) for faster stream copying. (Jakub Zelenka, David Carlier)
72+
. Fixed bug GH-22841 (php_stream_copy_to_stream_ex() drops progress
73+
notifications when using the copy fast path). (David Carlier)
74+
. Fixed bug GH-15836 (Use-after-free when a user stream filter accesses
75+
$this->stream during the close flush). (iliaal)
6276

6377
16 Jul 2026, PHP 8.6.0alpha2
6478

@@ -212,7 +226,7 @@ PHP NEWS
212226
. Fix OSS-Fuzz #429429090 (Failed assertion on unset() with uninitialized
213227
container). (ilutov)
214228
. Fixed GH-20564 (Don't call autoloaders with pending exception). (ilutov)
215-
. Fix deprecation now showing when accessing null key of an array with JIT.
229+
. Fix deprecation not showing when accessing null key of an array with JIT.
216230
(alexandre-daubois)
217231
. Fixed bug GH-20174 (Assertion failure in
218232
ReflectionProperty::skipLazyInitialization after failed LazyProxy
@@ -356,6 +370,8 @@ PHP NEWS
356370
and Openssl\Session class. (Jakub Zelenka)
357371
. Added TLS external PSK support for streams with new context options and
358372
Openssl\Psk class. (Jakub Zelenka)
373+
. Added TLS 1.3 early data (0-RTT) support for streams with new context
374+
options early_data, max_early_data and early_data_cb. (Jakub Zelenka)
359375
. Added stream crypto status for exposing OpenSSL WANT_READ / WANT_WRITE.
360376
(Jakub Zelenka)
361377

UPGRADING

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,13 @@ PHP 8.6 UPGRADE NOTES
297297
requests, implementing custom server-side session storage, and controlling
298298
session cache behavior.
299299
RFC: https://wiki.php.net/rfc/tls_session_resumption
300-
. Added TLS external PSK support for streams with new strem context options:
300+
. Added TLS external PSK support for streams with new stream context options:
301301
psk_client_cb and psk_server_cb. This allows setting and receiving PSK.
302+
. Added TLS 1.3 early data (0-RTT) support for streams. Clients send early
303+
data with the early_data context option; servers accept it with
304+
max_early_data and receive it through the early_data_cb callback. The
305+
outcome is reported as 'accepted', 'rejected' or 'not_sent' in the
306+
early_data key of the crypto stream_get_meta_data() array.
302307

303308
- Phar:
304309
. Overriding the getMTime() and getPathname() methods of SplFileInfo now

UPGRADING.INTERNALS

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,43 @@ PHP 8.6 INTERNALS UPGRADE NOTES
8383
. The php_error_docref1() and php_error_docref2() functions have been
8484
removed, instead rely on the error_include_args INI option to show the
8585
arguments to functions in a consistent manner.
86+
. The following PHP stream functions prefixed with _ have been removed,
87+
and the macro without it has become the canonical function name:
88+
* _php_stream_cast()
89+
* _php_stream_free_enclosed()
90+
* _php_stream_free()
91+
* _php_stream_seek()
92+
* _php_stream_tell()
93+
* _php_stream_read()
94+
* _php_stream_write()
95+
* _php_stream_fill_read_buffer()
96+
* _php_stream_printf()
97+
* _php_stream_eof()
98+
* _php_stream_getc()
99+
* _php_stream_putc()
100+
* _php_stream_flush()
101+
* _php_stream_sync()
102+
* _php_stream_get_line()
103+
* _php_stream_puts()
104+
* _php_stream_stat()
105+
* _php_stream_mkdir()
106+
* _php_stream_rmdir()
107+
* _php_stream_readdir()
108+
* _php_stream_set_option()
109+
* _php_stream_get_url_stream_wrappers_hash()
110+
* _php_get_stream_filters_hash()
111+
* _php_stream_mmap_unmap()
112+
* _php_stream_mmap_unmap_ex()
113+
* _php_stream_filter_prepend()
114+
* _php_stream_filter_append()
115+
* _php_stream_filter_flush()
116+
. The PHP stream function _php_stream_stat_path() has been renamed to
117+
php_stream_stat_path_ex()
118+
. The PHP stream function _php_stream_scandir() was removed,
119+
insted the PHP macro php_stream_scandir() is now a function as the
120+
flags parameter was never used.
121+
. The PHP stream function _php_stream_flush() was removed,
122+
instead the PHP macro php_stream_flush() is now a proper function.
86123

87124
- Changed:
88125
. Internal functions that return by reference are now expected to
@@ -114,6 +151,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
114151
longer is a pointer, but a directly embedded HashTable struct.
115152
. Extended php_stream_filter_ops with seek method.
116153
. zend_argument_error_variadic() now takes a new 'function' parameter.
154+
. The param argument in the php_verror() function has been removed.
117155

118156
- Added:
119157
. New zend_class_entry.ce_flags2 and zend_function.fn_flags2 fields were

Zend/Optimizer/zend_optimizer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,10 @@ static void zend_optimize(zend_op_array *op_array,
10521052
}
10531053

10541054
if (ctx->debug_level & ZEND_DUMP_BEFORE_OPTIMIZER) {
1055-
zend_dump_op_array(op_array, ZEND_DUMP_LIVE_RANGES, "before optimizer", NULL);
1055+
uint32_t additional_dump_flags = (ctx->debug_level & ZEND_DUMP_LINE_NUMBERS_PASSTHRU)
1056+
? ZEND_DUMP_LINE_NUMBERS
1057+
: 0;
1058+
zend_dump_op_array(op_array, ZEND_DUMP_LIVE_RANGES|additional_dump_flags, "before optimizer", NULL);
10561059
}
10571060

10581061
/* pass 1 (Simple local optimizations)

Zend/Optimizer/zend_optimizer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define ZEND_DUMP_DFA_SSA (1<<27)
8181
#define ZEND_DUMP_DFA_SSA_VARS (1<<28)
8282
#define ZEND_DUMP_SCCP (1<<29)
83+
#define ZEND_DUMP_LINE_NUMBERS_PASSTHRU (1<<30)
8384

8485
typedef struct _zend_script {
8586
zend_string *filename;

Zend/tests/first_class_callable/constexpr/gh22782.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ opcache.enable=1
77
opcache.enable_cli=1
88
opcache.optimization_level=-1
99
opcache.preload={PWD}/gh22782.inc
10+
opcache.file_cache_only=0
1011
--SKIPIF--
1112
<?php
1213
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');

Zend/tests/oss-fuzz-539121135.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
OSS-Fuzz-539121135: Use-of-uninitialized-value ast->lineno
3+
--FILE--
4+
<?php
5+
6+
namespace {}
7+
8+
''
9+
10+
?>
11+
--EXPECTF--
12+
Fatal error: No code may exist outside of namespace {} in %s on line %d

Zend/tests/partial_application/preloading.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PFA preloading
44
opcache.enable=1
55
opcache.enable_cli=1
66
opcache.preload={PWD}/preloading.inc
7+
opcache.file_cache_only=0
78
--SKIPIF--
89
<?php
910
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');

0 commit comments

Comments
 (0)