1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

144253 Commits

Author SHA1 Message Date
David Carlier
b6b26f430a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/ffi: Fix resource leak in FFI::cdef() on symbol resolution failure.
2026-03-22 21:56:16 +00:00
David Carlier
97bb48ec2e ext/ffi: Fix resource leak in FFI::cdef() on symbol resolution failure.
and remove duplicate conditions in read/write field handlers.
close GH-21446
2026-03-22 21:55:13 +00:00
ndossche
99365b8834 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21486: Dom\HTMLDocument parser mangles xml:space and xml:lang attributes
2026-03-22 09:57:56 +01:00
ndossche
c920daa7ec Fix GH-21486: Dom\HTMLDocument parser mangles xml:space and xml:lang attributes
Closes GH-21489.
2026-03-22 09:57:26 +01:00
Ilija Tovilo
b0215e9c1b Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Harden bug74093.phpt
2026-03-22 01:56:44 +01:00
Ilija Tovilo
c52cfaf88b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Harden bug74093.phpt
2026-03-22 01:56:38 +01:00
Ilija Tovilo
bc8a95e4fb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Harden bug74093.phpt
2026-03-22 01:56:32 +01:00
Ilija Tovilo
486c09cd68 [skip ci] Harden bug74093.phpt
Rarely fails with "Maximum execution time of 1 seconds exceeded" due to being
too fast. Increase the compared arrays and mark as FLAKY, given this is
inherently dependent on processing speed.
2026-03-22 01:54:55 +01:00
Ilija Tovilo
afbca756e8 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Fix CLEAN for phar_extract2.phpt
2026-03-22 00:43:04 +01:00
Ilija Tovilo
6fd46f12f5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix CLEAN for phar_extract2.phpt
2026-03-22 00:42:59 +01:00
Ilija Tovilo
eca83d2baf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix CLEAN for phar_extract2.phpt
2026-03-22 00:42:54 +01:00
Ilija Tovilo
0f544b0406 [skip ci] Fix CLEAN for phar_extract2.phpt
extract1/ is not created by this test, but by phar_extract.phpt, which can lead
to a very rare race condition.
2026-03-22 00:41:37 +01:00
Remi Collet
d8560ad177 use lexbor version from library 2026-03-21 14:29:36 +01:00
ndossche
0d7ce4c037 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  openssl: Fix missing error propagation for BIO_printf() calls
2026-03-21 10:35:59 +01:00
ndossche
f92d54b6b5 openssl: Fix missing error propagation for BIO_printf() calls
Since these go through a file, this can fail.
For some of these, the error is already checked but not propagated to
userland, causing a "true" return value but an incomplete file.
For others, the error is not checked and can also lead to an incomplete
file.
Solve this by always propagating failure, especially as the other write
calls are already checked for failure.

Closes GH-21360.
2026-03-21 10:35:34 +01:00
Máté Kocsis
6932260386 Fix replacement of class signatures when a packagesynopsis element is present
So far, the gen_stub.php --replace-classsynopses subcommand didn't take the packagesynopsis element into account, causing some bugs: the wrong element was tried to be replaced (classynopsis instead of packagesynopsis) with the wrong content (the classname without the namespace: e.g. \Exception instead of \FFI\Exception).
2026-03-20 23:30:01 +01:00
Arnaud Le Blanc
5485f8ee40 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20875: Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies
2026-03-20 15:45:42 +01:00
Ilia Alshanetsky
9ec303edde Fix GH-20875: Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies
zend_std_get_property_ptr_ptr() was the only property handler that did
not propagate the IN_GET guard to the underlying object when forwarding
from a lazy proxy after initialization. This caused __get to be called
on the underlying object when it shouldn't be, leading to assertion
failures.

The same guard-copying pattern already existed in read_property,
write_property, unset_property, and has_property since commit
26f5009e91 (GH-18039).

Also fixes GH-20873 and GH-20854.

Closes GH-20875
2026-03-20 15:44:21 +01:00
Ilija Tovilo
f134227e5d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Use default branch for symfony/laravel when possible
  Fix Laravel build for PHP 8.2
2026-03-20 14:50:08 +01:00
Ilija Tovilo
69b455c89e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Use default branch for symfony/laravel when possible
  Fix Laravel build for PHP 8.2
2026-03-20 14:50:02 +01:00
Ilija Tovilo
d1c39a5bd9 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use default branch for symfony/laravel when possible
  Fix Laravel build for PHP 8.2
2026-03-20 14:49:54 +01:00
Ilija Tovilo
272cf1fb2d Use default branch for symfony/laravel when possible
This way we don't have to keep bumping when new branches release, we just need
to pin to old versions when incompatibilities pop up.
2026-03-20 13:32:42 +01:00
Ilija Tovilo
183d2a617f Fix Laravel build for PHP 8.2
Laravel 13.x dropped support for PHP 8.2. Fall back to 12.x for 8.2.

Closes GH-21473
2026-03-20 13:14:43 +01:00
Ilija Tovilo
f7753608cc Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix expected output for bug52820.phpt
2026-03-19 13:19:01 +01:00
Ilija Tovilo
b97dd3318d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix expected output for bug52820.phpt
2026-03-19 13:18:54 +01:00
Ilija Tovilo
551809576b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix expected output for bug52820.phpt
2026-03-19 13:18:36 +01:00
Ilija Tovilo
b8b5fb074d Fix expected output for bug52820.phpt
Newer versions of curl seem to omit the "Closing connection ..." message. Make
the entire line optional.
2026-03-19 13:15:57 +01:00
Dmitry Stogov
aa9964eebb Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21411: opcache_compile_file() fails to early-bind classes without parents (#21412)
2026-03-19 11:13:30 +03:00
Rasmus Lerdorf
1a79ea47c5 Fix GH-21411: opcache_compile_file() fails to early-bind classes without parents (#21412) 2026-03-19 11:12:45 +03:00
ndossche
cefdfc9f5c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [ci skip] Update JIT news
2026-03-17 08:53:41 +01:00
ndossche
ae863ea4f8 [ci skip] Update JIT news
Closes GH-21395.
2026-03-17 08:53:10 +01:00
ndossche
c9a6743b59 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21454: Missing write lock validation in SplHeap
2026-03-17 08:47:46 +01:00
ndossche
8796d75365 Fix GH-21454: Missing write lock validation in SplHeap
Closes GH-21448.
2026-03-17 08:47:20 +01:00
Dmitry Stogov
0b2d8136e3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update IR (#21462)
2026-03-16 22:55:26 +03:00
Dmitry Stogov
a5637221ee Update IR (#21462)
IR commit: 7fed7999743ba6a5ffc5535e786725d5577f6f34
2026-03-16 22:55:03 +03:00
Dmitry Stogov
00ff93d660 Fix support for TAILCALL VM 2026-03-16 21:57:40 +03:00
Dmitry Stogov
81504d3db7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21267: JIT infinite loop on FETCH_OBJ_R with IS_UNDEF property (#21368)
2026-03-16 21:32:27 +03:00
Ilia Alshanetsky
e1a3a4c9a4 Fix GH-21267: JIT infinite loop on FETCH_OBJ_R with IS_UNDEF property (#21368)
When the JIT defers the IS_UNDEF check for FETCH_OBJ_R to the result
type guard, the deoptimization escape path dispatches to opline->handler
via the trace_escape stub. If opline->handler has been overwritten with
JIT code (e.g. a function entry trace), this creates an infinite loop.

Fix by dispatching to the original VM handler (orig_handler from the
trace extension) instead of going through the trace_escape stub. This
avoids the extra IS_UNDEF guard on every property read while correctly
handling the rare IS_UNDEF case during deoptimization.

Also set current_op_array in zend_jit_trace_exit_to_vm so that the
blacklisted exit deoptimizer can resolve orig_handler, covering the
case where side trace compilation is exhausted.

Closes GH-21368.
2026-03-16 21:31:49 +03:00
David Carlier
277a016723 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/gd: phpinfo() to be able to display libjpeg 10.0 support.
2026-03-14 18:24:17 +00:00
David Carlier
e257c086bb ext/gd: phpinfo() to be able to display libjpeg 10.0 support.
Fix #21431

Co-Authored-By: rainerjung

close GH-21432
2026-03-14 18:23:35 +00:00
ndossche
e0ac74fb52 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/zip: Fix const-generic compile warning
2026-03-14 15:07:06 +01:00
ndossche
b95f0ebc47 ext/zip: Fix const-generic compile warning 2026-03-14 15:06:57 +01:00
ndossche
ed3eb8519a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [ci skip] NEWS for GH-20838
2026-03-12 22:04:32 +01:00
ndossche
9150226166 [ci skip] NEWS for GH-20838 2026-03-12 22:04:08 +01:00
ndossche
757dadcf1f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21083: Skip private_key_bits validation for EC/curve-based keys
2026-03-12 22:01:21 +01:00
Ilia Alshanetsky
7950482562 Fix GH-21083: Skip private_key_bits validation for EC/curve-based keys
openssl_pkey_new() checks private_key_bits >= 384 before generating any
key. For EC, X25519, ED25519, X448, and ED448 the size is inherent to
the curve or algorithm, so this check doesn't apply and causes failures
when default_bits is missing from openssl.cnf (which is the case in
OpenSSL 3.6's default config).

Skip the minimum-bits check for key types that don't use private_key_bits.

Closes GH-21387.
2026-03-12 21:53:22 +01:00
ndossche
a3f486dfa3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21357: XSLTProcessor works with DOMDocument, but fails with Dom\XMLDocument
2026-03-11 22:31:33 +01:00
ndossche
284fd7779d Fix GH-21357: XSLTProcessor works with DOMDocument, but fails with Dom\XMLDocument
Registering namespace after the parsing is too late because parsing can
fail due to attributes referencing namespaces.
So we have to register fake namespaces before the parsing.
However, the clone operation reconciles namespaces in the wrong way, so
we have to clone via an object.

Closes GH-21371.
2026-03-11 22:31:03 +01:00
Dmitry Stogov
35ee95a827 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20838: JIT compiler produces wrong arithmetic results (#21383)
2026-03-11 15:23:12 +03:00
Ilia Alshanetsky
80dc4c19d6 Fix GH-20838: JIT compiler produces wrong arithmetic results (#21383)
Insert type guards (CHECK_OP1_TRACE_TYPE / CHECK_OP2_TRACE_TYPE) on the
sensitive bailout paths in ADD/SUB/MUL JIT compilation: the MAY_BE_UNDEF
and non-numeric operand breaks. Guards are only emitted when the traced
operand type is IS_LONG or IS_DOUBLE, ensuring TSSA result type
predictions stay valid for side traces without affecting the normal
numeric fast path.


Fixes GH-20838

Co-authored-by: Dmitry Stogov <dmitrystogov@gmail.com>
2026-03-11 15:22:50 +03:00