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

145471 Commits

Author SHA1 Message Date
ndossche
8f9a8c00e7 Fix GH-21421: SoapClient typemap property breaks engine assumptions
The conversion away from resources introduced the contents of the
typemap property, which internally uses IS_PTR zvals.
These should never be exposed because to userland they break engine
assumptions. To solve this, we hide this in an internal field.
We also disable cloning in the process which is broken in most cases
because it doesn't clone internal data.

Closes GH-21422.
2026-03-23 22:07:45 +01:00
Weilin Du
2918caee20 ext/*: Remove break after return (#21485) 2026-03-23 20:30:13 +01:00
Gina Peter Banyard
d34c840b4e zend_builtin_functions.c: add const qualifiers (#21487) 2026-03-23 11:00:20 +00:00
Gina Peter Banyard
be1ae8ef6f Zend: add const modifiers (#19571) 2026-03-23 10:52:28 +00:00
David Carlier
00c0a9ba30 Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/ffi: Fix resource leak in FFI::cdef() on symbol resolution failure.
2026-03-22 21:58:09 +00:00
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
be539d95c8 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21486: Dom\HTMLDocument parser mangles xml:space and xml:lang attributes
2026-03-22 09:58:02 +01: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
cb8d3a27c3 Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Harden bug74093.phpt
2026-03-22 01:56:48 +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
61c83f8af5 Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Fix CLEAN for phar_extract2.phpt
2026-03-22 00:43:10 +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
Ilija Tovilo
9011bd31d7 [skip ci] Fix CI badge in README
push.yml has been unified with nightly.yml into test.yml.
2026-03-21 23:43:09 +01:00
ndossche
74fad61607 Add test for array_diff() array maximum
Forgot to commit this in 614b22ab.
2026-03-21 22:58:49 +01:00
Gina Peter Banyard
f40b356ad9 Use smart_str_append() if we have a zend_string* (#21414) 2026-03-21 17:06:14 +00:00
Gina Peter Banyard
4d528531be ext/spl: extract AppendIterator constructor (#21367)
The implementation of it is simple whereas spl_dual_it_construct() is extremely convoluted
2026-03-21 17:05:33 +00:00
Remi Collet
f102735d71 Merge branch 'PHP-8.5'
* PHP-8.5:
  use lexbor version from library
2026-03-21 14:29:50 +01:00
Remi Collet
d8560ad177 use lexbor version from library 2026-03-21 14:29:36 +01:00
Arshid
c524773a4f ext/ftp: Remove unreachable break (#21481) 2026-03-21 11:24:04 +00:00
Arshid
d3727f44e7 ext/pgsql: Remove unreachable break (#21482) 2026-03-21 09:39:44 +00:00
ndossche
a6a7b3923a Merge branch 'PHP-8.5'
* PHP-8.5:
  openssl: Fix missing error propagation for BIO_printf() calls
2026-03-21 10:36:04 +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
ndossche
614b22ab46 Add array size maximum to array_diff()
This silences some reports about the equivalence to array_merge()'s
issue. However, this is different as no packed fill is used in this
code, so it doesn't have the same bug that array_merge() had.

Closes GH-21449.
2026-03-21 10:20:11 +01:00
Máté Kocsis
30b2d77cd3 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix replacement of class signatures when a packagesynopsis element is present
2026-03-20 23:30:35 +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
Daniel Scherzer
36e1469fe1 gen_stub: use first class callables where possible 2026-03-20 14:44:28 -07:00
Daniel Scherzer
362f5fdb09 gen_stub: use match rather than switch when possible 2026-03-20 14:44:28 -07:00
Daniel Scherzer
ef5771dce2 gen_stub: use real readonly modifier 2026-03-20 14:44:27 -07:00
Daniel Scherzer
b83dd1055b gen_stub: use real mixed type 2026-03-20 14:44:10 -07:00
Arnaud Le Blanc
2e20074310 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20875: Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies
2026-03-20 15:45:55 +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
e39b6b9697 Merge branch 'PHP-8.5'
* PHP-8.5:
  Use default branch for symfony/laravel when possible
  Fix Laravel build for PHP 8.2
2026-03-20 14:50:13 +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
Gina Peter Banyard
38cbbee4aa Zend: add const qualifiers to the majority of compare functions (#21304)
This sadly does not include zend_compare() and functions relying on it because the default compare object hook (zend_std_compare_objects()) relies on zend_compare(), and adds recursion protections to OP1.
Thus making it seems difficult or even impossible for zend_compare to take const parameters.
2026-03-19 20:36:19 +00:00
Ilija Tovilo
8c42cf473e Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix expected output for bug52820.phpt
2026-03-19 13:19:07 +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