Skip to content

Commit 31b733f

Browse files
committed
Merge tag 'php-8.3.22' into was-8.3.x
Tag for php-8.3.22
2 parents 4ac6afa + 6c08c56 commit 31b733f

File tree

69 files changed

+832
-1000146
lines changed

Some content is hidden

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

69 files changed

+832
-1000146
lines changed

.github/actions/freebsd/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ runs:
2727
bzip2 \
2828
t1lib \
2929
gmp \
30-
tidyp \
3130
libsodium \
3231
libzip \
3332
libxml2 \

.github/workflows/nightly.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ on:
2929
windows_version:
3030
required: true
3131
type: string
32+
skip_laravel:
33+
required: true
34+
type: boolean
3235
skip_symfony:
3336
required: true
3437
type: boolean
@@ -550,7 +553,7 @@ jobs:
550553
git clone "https://github.com/amphp/$repository.git" "amphp-$repository" --depth 1
551554
cd "amphp-$repository"
552555
git rev-parse HEAD
553-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
556+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
554557
vendor/bin/phpunit || EXIT_CODE=$?
555558
if [ ${EXIT_CODE:-0} -gt 128 ]; then
556559
X=1;
@@ -559,12 +562,12 @@ jobs:
559562
done
560563
exit $X
561564
- name: Test Laravel
562-
if: ${{ !cancelled() }}
565+
if: ${{ !cancelled() && !inputs.skip_laravel }}
563566
run: |
564567
git clone https://github.com/laravel/framework.git --depth=1
565568
cd framework
566569
git rev-parse HEAD
567-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
570+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
568571
# Hack to disable a test that hangs
569572
php -r '$c = file_get_contents("tests/Filesystem/FilesystemTest.php"); $c = str_replace("public function testSharedGet()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSharedGet()", $c); file_put_contents("tests/Filesystem/FilesystemTest.php", $c);'
570573
php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
@@ -581,7 +584,7 @@ jobs:
581584
git clone "https://github.com/reactphp/$repository.git" "reactphp-$repository" --depth 1
582585
cd "reactphp-$repository"
583586
git rev-parse HEAD
584-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
587+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
585588
vendor/bin/phpunit || EXIT_CODE=$?
586589
if [ $[EXIT_CODE:-0} -gt 128 ]; then
587590
X=1;
@@ -595,7 +598,7 @@ jobs:
595598
git clone https://github.com/revoltphp/event-loop.git --depth=1
596599
cd event-loop
597600
git rev-parse HEAD
598-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
601+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
599602
vendor/bin/phpunit || EXIT_CODE=$?
600603
if [ ${EXIT_CODE:-0} -gt 128 ]; then
601604
exit 1
@@ -606,7 +609,7 @@ jobs:
606609
git clone https://github.com/symfony/symfony.git --depth=1
607610
cd symfony
608611
git rev-parse HEAD
609-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
612+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
610613
php ./phpunit install
611614
# Test causes a heap-buffer-overflow but I cannot reproduce it locally...
612615
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "/** @group skip */\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
@@ -627,15 +630,15 @@ jobs:
627630
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
628631
cd phpunit
629632
git rev-parse HEAD
630-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
633+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
631634
php ./phpunit || EXIT_CODE=$?
632635
if [ ${EXIT_CODE:-0} -gt 128 ]; then
633636
exit 1
634637
fi
635638
- name: 'Symfony Preloading'
636639
if: ${{ !cancelled() && !inputs.skip_symfony }}
637640
run: |
638-
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
641+
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-req=php+
639642
cd symfony_demo
640643
git rev-parse HEAD
641644
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
@@ -646,7 +649,7 @@ jobs:
646649
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
647650
cd wordpress
648651
git rev-parse HEAD
649-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
652+
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
650653
cp wp-tests-config-sample.php wp-tests-config.php
651654
sed -i 's/youremptytestdbnamehere/test/g' wp-tests-config.php
652655
sed -i 's/yourusernamehere/root/g' wp-tests-config.php

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
6060
|| '22.04' }}
6161
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
62+
skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6263
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6364
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6465
secrets: inherit

EXTENSIONS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,49 +181,56 @@ EXTENSION: dom
181181
PRIMARY MAINTAINER: Christian Stocker <[email protected]> (2003 - 2011)
182182
Rob Richards <[email protected]> (2003 - 2012)
183183
Marcus Börger <[email protected]> (2003 - 2006)
184+
Niels Dossche <[email protected]> (2023 - 2025)
184185
MAINTENANCE: Maintained
185186
STATUS: Working
186187
SINCE: 5.0
187188
-------------------------------------------------------------------------------
188189
EXTENSION: simplexml
189190
PRIMARY MAINTAINER: Marcus Börger <[email protected]> (2003 - 2008)
191+
Niels Dossche <[email protected]> (2023 - 2025)
190192
MAINTENANCE: Maintained
191193
STATUS: Working
192194
SINCE: 5.0
193195
-------------------------------------------------------------------------------
194196
EXTENSION: soap
195197
PRIMARY MAINTAINER: Dmitry Stogov <[email protected]> (2004 - 2018)
196-
Niels Dossche <[email protected]> (2024 - 2024)
198+
Niels Dossche <[email protected]> (2024 - 2025)
197199
MAINTENANCE: Odd fixes
198200
STATUS: Working
199201
-------------------------------------------------------------------------------
200202
EXTENSION: xml
201203
PRIMARY MAINTAINER: Thies C. Arntzen <[email protected]> (1999 - 2002)
202204
Rob Richards <[email protected]> (2003 - 2013)
205+
Niels Dossche <[email protected]> (2023 - 2025)
203206
MAINTENANCE: Maintained
204207
STATUS: Working
205208
-------------------------------------------------------------------------------
206209
EXTENSION: libxml
207210
PRIMARY MAINTAINER: Rob Richards <[email protected]> (2003 - 2009)
208211
Christian Stocker <[email protected]> (2004 - 2011)
212+
Niels Dossche <[email protected]> (2023 - 2025)
209213
MAINTENANCE: Maintained
210214
STATUS: Working
211215
-------------------------------------------------------------------------------
212216
EXTENSION: xmlreader
213217
PRIMARY MAINTAINER: Rob Richards <[email protected]> (2004 - 2010)
214218
Christian Stocker <[email protected]> (2004 - 2004)
219+
Niels Dossche <[email protected]> (2023 - 2025)
215220
MAINTENANCE: Maintained
216221
STATUS: Working
217222
-------------------------------------------------------------------------------
218223
EXTENSION: xmlwriter
219224
PRIMARY MAINTAINER: Rob Richards <[email protected]> (2004 - 2010)
220225
Pierre-Alain Joye <[email protected]> (2005-2009)
226+
Niels Dossche <[email protected]> (2023 - 2025)
221227
MAINTENANCE: Maintained
222228
STATUS: Working
223229
-------------------------------------------------------------------------------
224230
EXTENSION: xsl
225231
PRIMARY MAINTAINER: Christian Stocker <[email protected]> (2003 - 2011)
226232
Rob Richards <[email protected]> (2003 - 2010)
233+
Niels Dossche <[email protected]> (2023 - 2025)
227234
MAINTENANCE: Maintained
228235
STATUS: Working
229236
SINCE: 5.0

NEWS

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
05 Jun 2025, PHP 8.3.22
4+
5+
- Core:
6+
. Fixed GH-18480 (array_splice with large values for offset/length arguments).
7+
(nielsdos/David Carlier)
8+
. Partially fixed GH-18572 (nested object comparisons leading to stack overflow).
9+
(David Carlier)
10+
. Fixed OSS-Fuzz #417078295. (nielsdos)
11+
. Fixed OSS-Fuzz #418106144. (nielsdos)
12+
13+
- Curl:
14+
. Fixed GH-18460 (curl_easy_setopt with CURLOPT_USERPWD/CURLOPT_USERNAME/
15+
CURLOPT_PASSWORD set the Authorization header when set to NULL).
16+
(David Carlier)
17+
18+
- Date:
19+
. Fixed bug GH-18076 (Since PHP 8, the date_sun_info() function returns
20+
inaccurate sunrise and sunset times, but other calculated times are
21+
correct) (JiriJozif).
22+
. Fixed bug GH-18481 (date_sunrise with unexpected nan value for the offset).
23+
(nielsdos/David Carlier)
24+
25+
- Intl:
26+
. Fix various reference issues. (nielsdos)
27+
28+
- LDAP:
29+
. Fixed bug GH-18529 (ldap no longer respects TLS_CACERT from ldaprc in
30+
ldap_start_tls()). (Remi)
31+
32+
- Opcache:
33+
. Fixed bug GH-18417 (Windows SHM reattachment fails when increasing
34+
memory_consumption or jit_buffer_size). (nielsdos)
35+
. Fixed bug GH-18567 (Preloading with internal class alias triggers assertion
36+
failure). (nielsdos)
37+
. Fix leak of accel_globals->key. (nielsdos)
38+
39+
- OpenSSL:
40+
. Fix missing checks against php_set_blocking() in xp_ssl.c. (nielsdos)
41+
42+
- PDO_OCI:
43+
. Fixed bug GH-18494 (PDO OCI segfault in statement GC). (nielsdos)
44+
45+
- SPL:
46+
. Fixed bug GH-18421 (Integer overflow with large numbers in LimitIterator).
47+
(nielsdos)
48+
49+
- Standard:
50+
. Fixed bug GH-17403 (Potential deadlock when putenv fails). (nielsdos)
51+
. Fixed bug GH-18509 (Dynamic calls to assert() ignore zend.assertions).
52+
(timwolla)
53+
54+
- Windows:
55+
. Fix leak+crash with sapi_windows_set_ctrl_handler(). (nielsdos)
56+
57+
- Zip:
58+
. Fixed bug GH-18431 (Registering ZIP progress callback twice doesn't work).
59+
(nielsdos)
60+
. Fixed bug GH-18438 (Handling of empty data and errors in
61+
ZipArchive::addPattern). (nielsdos)
62+
363
08 May 2025, PHP 8.3.21
464

565
- Core:

Zend/tests/gh18572.phpt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
--TEST--
2+
GH-18572: Nested object comparison leading to stack overflow
3+
--SKIPIF--
4+
<?php
5+
if (getenv('SKIP_ASAN')) die('skip as it fatally crash');
6+
?>
7+
--FILE--
8+
<?php
9+
10+
#[AllowDynamicProperties]
11+
class Node {
12+
public $next;
13+
// forcing dynamic property creation is key
14+
}
15+
16+
$first = new Node();
17+
$first->previous = $first;
18+
$first->next = $first;
19+
20+
$cur = $first;
21+
22+
for ($i = 0; $i < 50000; $i++) {
23+
$new = new Node();
24+
$new->previous = $cur;
25+
$cur->next = $new;
26+
$new->next = $first;
27+
$first->previous = $new;
28+
$cur = $new;
29+
}
30+
31+
try {
32+
// Force comparison manually to trigger zend_hash_compare
33+
$first == $cur;
34+
} catch(Error $e) {
35+
echo $e->getMessage(). PHP_EOL;
36+
}
37+
?>
38+
--EXPECTREGEX--
39+
(Maximum call stack size reached during object comparison|Fatal error: Nesting level too deep - recursive dependency\?.+)

Zend/tests/gh418106144.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
OSS-Fuzz #418106144
3+
--FILE--
4+
<?php
5+
6+
class Foo {
7+
function __toString(){}
8+
}
9+
function test($y=new Foo>''){
10+
var_dump();
11+
}
12+
try {
13+
test();
14+
} catch (TypeError $e) {
15+
echo $e->getMessage(), "\n";
16+
}
17+
18+
?>
19+
--EXPECT--
20+
Foo::__toString(): Return value must be of type string, none returned

Zend/tests/oss_fuzz_417078295.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
OSS-Fuzz #417078295
3+
--FILE--
4+
<?php
5+
6+
function foo() {
7+
$a = new stdClass();
8+
static $a = $a;
9+
debug_zval_dump($a);
10+
}
11+
12+
foo();
13+
14+
?>
15+
--EXPECT--
16+
object(stdClass)#1 (0) refcount(2){
17+
}

Zend/zend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef ZEND_H
2121
#define ZEND_H
2222

23-
#define ZEND_VERSION "4.3.21"
23+
#define ZEND_VERSION "4.3.22"
2424

2525
#define ZEND_ENGINE_3
2626

Zend/zend_ast.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,10 @@ ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner(
565565
/* op1 > op2 is the same as op2 < op1 */
566566
binary_op_type op = ast->kind == ZEND_AST_GREATER
567567
? is_smaller_function : is_smaller_or_equal_function;
568-
ret = op(result, &op2, &op1);
568+
op(result, &op2, &op1);
569569
zval_ptr_dtor_nogc(&op1);
570570
zval_ptr_dtor_nogc(&op2);
571+
ret = EG(exception) ? FAILURE : SUCCESS;
571572
}
572573
break;
573574
case ZEND_AST_UNARY_OP:

0 commit comments

Comments
 (0)