Skip to content

Commit 619a310

Browse files
committed
Merge branch 'PHP-8.4' into fix/windows-clang
2 parents a149b27 + 3037526 commit 619a310

88 files changed

Lines changed: 4128 additions & 2950 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/actions/build-libmysqlclient/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ inputs:
55
required: false
66
libmysql:
77
required: true
8-
withMysqli:
9-
required: true
108
runs:
119
using: composite
1210
steps:
@@ -21,13 +19,11 @@ runs:
2119
wget -nv $URL
2220
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
2321
PDO_MYSQL=${MYSQL_DIR}
24-
${{ inputs.withMysqli == 'true' && 'MYSQLI=${MYSQL_DIR}/bin/mysql_config' || '' }}
2522
./buildconf --force
2623
./configure ${{ inputs.configurationParameters }} \
2724
--enable-option-checking=fatal \
2825
--disable-all \
2926
--enable-pdo \
30-
--with-pdo-mysql=${PDO_MYSQL} \
31-
${{ inputs.withMysqli == 'true' && '--with-mysqli=${MYSQLI}' || '' }}
27+
--with-pdo-mysql=${PDO_MYSQL}
3228
make clean
3329
make -j$(/usr/bin/nproc) >/dev/null

.github/actions/test-libmysqlclient/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
name: Test libmysqlclient
2-
inputs:
3-
withMysqli:
4-
required: true
52
runs:
63
using: composite
74
steps:
85
- shell: bash
96
run: |
107
set -x
11-
${{ inputs.withMysqli == 'true' && 'export MYSQL_TEST_USER=root' || '' }}
12-
${{ inputs.withMysqli == 'true' && 'export MYSQL_TEST_PASSWD=root' || '' }}
138
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
149
export PDO_MYSQL_TEST_HOST=127.0.0.1
1510
export PDO_MYSQL_TEST_USER=root

.github/workflows/nightly.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ on:
1111
community_verify_type_inference:
1212
required: true
1313
type: boolean
14-
libmysqlclient_with_mysqli:
15-
required: true
16-
type: boolean
1714
run_alpine:
1815
required: true
1916
type: boolean
@@ -436,7 +433,7 @@ jobs:
436433
FIREBIRD_DATABASE: test.fdb
437434
FIREBIRD_USER: test
438435
FIREBIRD_PASSWORD: test
439-
runs-on: ubuntu-22.04
436+
runs-on: ubuntu-24.04
440437
steps:
441438
- name: git checkout
442439
uses: actions/checkout@v6
@@ -854,30 +851,22 @@ jobs:
854851
- name: Build mysql-8.0
855852
uses: ./.github/actions/build-libmysqlclient
856853
with:
857-
configurationParameters: ${{ !inputs.libmysqlclient_with_mysqli && '--enable-werror' || '' }}
854+
configurationParameters: '--enable-werror'
858855
libmysql: mysql-8.0.37-linux-glibc2.28-x86_64.tar.xz
859-
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
860856
- name: Test mysql-8.0
861857
uses: ./.github/actions/test-libmysqlclient
862-
with:
863-
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
864858
- name: Build mysql-8.4
865-
if: ${{ !inputs.libmysqlclient_with_mysqli }}
866859
uses: ./.github/actions/build-libmysqlclient
867860
with:
868-
configurationParameters: ${{ !inputs.libmysqlclient_with_mysqli && '--enable-werror' || '' }}
861+
configurationParameters: '--enable-werror'
869862
libmysql: mysql-8.4.0-linux-glibc2.28-x86_64.tar.xz
870-
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
871863
- name: Test mysql-8.4
872-
if: ${{ !inputs.libmysqlclient_with_mysqli }}
873864
uses: ./.github/actions/test-libmysqlclient
874-
with:
875-
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
876865
- name: Verify generated files are up to date
877866
uses: ./.github/actions/verify-generated-files
878867
PECL:
879868
if: inputs.branch == 'master'
880-
runs-on: ubuntu-22.04
869+
runs-on: ubuntu-24.04
881870
env:
882871
CC: ccache gcc
883872
CXX: ccache g++
@@ -924,6 +913,8 @@ jobs:
924913
sudo apt-get install -y --no-install-recommends \
925914
ccache \
926915
libmemcached-dev \
916+
imagemagick \
917+
libmagickwand-dev \
927918
bison \
928919
re2c
929920
- name: ccache

.github/workflows/root.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
|| '22.04' }}
4747
branch: ${{ matrix.branch.ref }}
4848
community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
49-
libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }}
5049
run_alpine: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5150
run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5251
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
@@ -56,8 +55,8 @@ jobs:
5655
|| '22.04' }}
5756
windows_version: '2022'
5857
vs_crt_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) && 'vs17') || 'vs16' }}
59-
skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
58+
skip_laravel: false
6059
symfony_version: ${{ (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '8.1') || '7.4' }}
61-
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
60+
skip_wordpress: false
6261
variation_enable_zend_max_execution_timers: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
6362
secrets: inherit

NEWS

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,79 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? ????, PHP 8.4.18
3+
?? ??? ????, PHP 8.4.19
4+
5+
- Core:
6+
. Fixed bug GH-21029 (zend_mm_heap corrupted on Aarch64, LTO builds). (Arnaud)
7+
8+
- PDO_PGSQL:
9+
. Fixed bug GH-21055 (connection attribute status typo for GSS negotiation).
10+
(lsaos)
11+
12+
- Windows:
13+
. Fixed compilation with clang (missing intrin.h include). (Kévin Dunglas)
14+
15+
12 Feb 2026, PHP 8.4.18
16+
17+
- Core:
18+
. Fixed bug GH-20837 (NULL dereference when calling ob_start() in shutdown
19+
function triggered by bailout in php_output_lock_error()). (timwolla)
20+
. Fix OSS-Fuzz #471533782 (Infinite loop in GC destructor fiber). (ilutov)
21+
. Fix OSS-Fuzz #472563272 (Borked block_pass JMP[N]Z optimization). (ilutov)
22+
. Fixed bug GH-GH-20914 (Internal enums can be cloned and compared). (Arnaud)
23+
. Fix OSS-Fuzz #474613951 (Leaked parent property default value). (ilutov)
24+
. Fixed bug GH-20766 (Use-after-free in FE_FREE with GC interaction). (Bob)
25+
. Fix OSS-Fuzz #471486164 (Broken by-ref assignment to uninitialized hooked
26+
backing value). (ilutov)
27+
. Fix OSS-Fuzz #438780145 (Nested finally with repeated return type check may
28+
uaf). (ilutov)
29+
. Fixed bug GH-20905 (Lazy proxy bailing __clone assertion). (ilutov)
30+
. Fixed bug GH-20479 (Hooked object properties overflow). (ndossche)
31+
32+
- Date:
33+
. Update timelib to 2022.16. (Derick)
34+
35+
- DOM:
36+
. Fixed GH-21041 (Dom\HTMLDocument corrupts closing tags within scripts).
37+
(lexborisov)
438

539
- MbString:
640
. Fixed bug GH-20833 (mb_str_pad() divide by zero if padding string is
741
invalid in the encoding). (ndossche)
42+
. Fixed bug GH-20836 (Stack overflow in mb_convert_variables with
43+
recursive array references). (alexandre-daubois)
44+
45+
- Opcache:
46+
. Fixed bug GH-20818 (Segfault in Tracing JIT with object reference).
47+
(khasinski)
48+
49+
- OpenSSL:
50+
. Fix memory leaks when sk_X509_new_null() fails. (ndossche)
51+
. Fix crash when in openssl_x509_parse() when i2s_ASN1_INTEGER() fails.
52+
(ndossche)
53+
. Fix crash in openssl_x509_parse() when X509_NAME_oneline() fails.
54+
(ndossche)
55+
56+
- Phar:
57+
. Fixed bug GH-20882 (buildFromIterator breaks with missing base directory).
58+
(ndossche)
59+
60+
- PGSQL:
61+
. Fixed INSERT/UPDATE queries building with PQescapeIdentifier() and possible
62+
UB. (David Carlier)
863

964
- Readline:
1065
. Fixed bug GH-18139 (Memory leak when overriding some settings
1166
via readline_info()). (ndossche)
1267

68+
- SPL:
69+
. Fixed bug GH-20856 (heap-use-after-free in SplDoublyLinkedList iterator
70+
when modifying during iteration). (ndossche)
71+
1372
- Standard:
1473
. Fixed bug #74357 (lchown fails to change ownership of symlink with ZTS)
1574
(Jakub Zelenka)
16-
17-
- Windows:
18-
. Fixed compilation with clang (missing intrin.h include).
19-
(Kévin Dunglas)
75+
. Fixed bug GH-20843 (var_dump() crash with nested objects)
76+
(David Carlier)
2077

2178
15 Jan 2026, PHP 8.4.17
2279

Zend/Optimizer/block_pass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ static zend_always_inline zend_basic_block *get_next_block(const zend_cfg *cfg,
11521152
}
11531153
next_block++;
11541154
}
1155-
while (next_block->len == 0 && !(next_block->flags & ZEND_BB_PROTECTED)) {
1155+
while (next_block->len == 0 && !(next_block->flags & (ZEND_BB_TARGET|ZEND_BB_PROTECTED))) {
11561156
next_block = cfg->blocks + next_block->successors[0];
11571157
}
11581158
return next_block;

Zend/Optimizer/zend_dump.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ static void zend_dump_unused_op(const zend_op *opline, znode_op op, uint32_t fla
122122
if (op.num != (uint32_t)-1) {
123123
fprintf(stderr, " try-catch(%u)", op.num);
124124
}
125+
} else if (ZEND_VM_OP_LOOP_END == (flags & ZEND_VM_OP_MASK)) {
126+
if (opline->extended_value & ZEND_FREE_ON_RETURN) {
127+
fprintf(stderr, " loop-end(+%u)", op.num);
128+
}
125129
} else if (ZEND_VM_OP_THIS == (flags & ZEND_VM_OP_MASK)) {
126130
fprintf(stderr, " THIS");
127131
} else if (ZEND_VM_OP_NEXT == (flags & ZEND_VM_OP_MASK)) {
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--TEST--
2+
Enum comparison (internal enum)
3+
--EXTENSIONS--
4+
zend_test
5+
--FILE--
6+
<?php
7+
8+
$foo = ZendTestUnitEnum::Foo;
9+
$bar = ZendTestUnitEnum::Bar;
10+
11+
var_dump($foo === $foo);
12+
var_dump($foo == $foo);
13+
14+
var_dump($foo === $bar);
15+
var_dump($foo == $bar);
16+
17+
var_dump($bar === $foo);
18+
var_dump($bar == $foo);
19+
20+
var_dump($foo > $foo);
21+
var_dump($foo < $foo);
22+
var_dump($foo >= $foo);
23+
var_dump($foo <= $foo);
24+
25+
var_dump($foo > $bar);
26+
var_dump($foo < $bar);
27+
var_dump($foo >= $bar);
28+
var_dump($foo <= $bar);
29+
30+
var_dump($foo > true);
31+
var_dump($foo < true);
32+
var_dump($foo >= true);
33+
var_dump($foo <= true);
34+
35+
?>
36+
--EXPECT--
37+
bool(true)
38+
bool(true)
39+
bool(false)
40+
bool(false)
41+
bool(false)
42+
bool(false)
43+
bool(false)
44+
bool(false)
45+
bool(true)
46+
bool(true)
47+
bool(false)
48+
bool(false)
49+
bool(false)
50+
bool(false)
51+
bool(false)
52+
bool(false)
53+
bool(false)
54+
bool(false)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Enum implements (internal enum)
3+
--EXTENSIONS--
4+
zend_test
5+
--FILE--
6+
<?php
7+
8+
var_dump(ZendTestUnitEnum::Foo instanceof _ZendTestInterface);
9+
var_dump(ZendTestEnumWithInterface::Foo instanceof _ZendTestInterface);
10+
11+
?>
12+
--EXPECT--
13+
bool(false)
14+
bool(true)

Zend/tests/enum/instanceof-backed-enum.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Auto implement BackedEnum interface
3+
--EXTENSIONS--
4+
zend_test
35
--FILE--
46
<?php
57

@@ -13,8 +15,12 @@ enum Baz: int {
1315

1416
var_dump(Foo::Bar instanceof BackedEnum);
1517
var_dump(Baz::Qux instanceof BackedEnum);
18+
var_dump(ZendTestUnitEnum::Foo instanceof BackedEnum);
19+
var_dump(ZendTestIntEnum::Foo instanceof BackedEnum);
1620

1721
?>
1822
--EXPECT--
1923
bool(false)
2024
bool(true)
25+
bool(false)
26+
bool(true)

0 commit comments

Comments
 (0)