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

142135 Commits

Author SHA1 Message Date
Ilija Tovilo
eb65ec41b7 Implement Closure::getCurrent() to retrieve current closure
Fixes GH-18163
Closes GH-18167
2025-07-21 16:07:49 +02:00
Ilija Tovilo
d20f4fca69 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix properties_info_table for abstract properties
2025-07-21 15:54:53 +02:00
Ilija Tovilo
c8cc23336d Fix properties_info_table for abstract properties
Fixes GH-19053
Closes GH-19140

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2025-07-21 15:54:24 +02:00
David Carlier
ff6c1c7a30 [ci kip] UPDATE NEWS 2025-07-21 12:30:52 +01:00
David CARLIER
bd886d21e7 Fix GH-19197: session build fails on system with memcpy as macro. (#19198)
Thus ZEND_STRL macro does not expand as expected so going back
to not using it like lower branches.
2025-07-21 10:19:29 +01:00
Niels Dossche
30f03021d1 [ci skip] Remove obsolete todo (#19195)
All arguments are documented on php.net, although result_type is called
mode in the docs and stub.
2025-07-21 10:57:54 +02:00
Tim Düsterhus
7f1b3606a8 main: Add PHP_BUILD_PROVIDER userland constant (#19157)
This constant can be handy for tools like PIE to determine the origin of a PHP
binary to provide better output / diagnostics.

see php/pie#275
see php/php-src#18168
2025-07-21 10:43:14 +02:00
David CARLIER
e91d2c719f zend: ZEND_NONSTRING for clang >= 20 support (#19193) 2025-07-20 22:27:06 +01:00
Niels Dossche
d7f9caf37c Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
2025-07-20 19:50:01 +02:00
Niels Dossche
f8196a5db5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
2025-07-20 19:49:56 +02:00
Niels Dossche
6cc4ae1f1d Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
For attributes, relying on the ref_map doesn't make sense the first
place as you can't really refer to attributes from attributes.
The code therefore assumes that the node is unique, which is broken.

Closes GH-19181.
2025-07-20 19:49:22 +02:00
Niels Dossche
541620cf78 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
2025-07-20 17:20:53 +02:00
Niels Dossche
cb73155945 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
2025-07-20 17:20:47 +02:00
Niels Dossche
312869381a Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
This implements a workaround for reconciliation not being performed for
document-less nodes in libxml<2.13.

Closes GH-19186.
2025-07-20 17:19:43 +02:00
David CARLIER
999d29dc2b ext/intl: reducing raw pointer usage in C++ part, using smart ones instead. (#19179) 2025-07-20 12:16:04 +01:00
Niels Dossche
726516b8c1 UPGRADING, UPGRADING.INTERNALS, and NEWS for SVG and extensible image API 2025-07-20 12:53:57 +02:00
Niels Dossche
0962c325fa Implement SVG image handler
This implements an SVG handler using the libxml reader API. This does
not parse the entire document but instead uses a pull parser to locate
the root element, check whether it's an svg root, do some extra sanity
checks on the attribute, and fill in the php_gfxinfo structure.
2025-07-20 12:53:57 +02:00
Niels Dossche
8db883c540 Add API to register custom image handlers
This is modelled similarly to the password registry API.
We have an array to which new handlers can be added, and when a built-in
handler cannot handle the image, we try the handlers in the array.
The standard module is in control of registering a new constant for the
image file type so that no clashes can occur. It also updates the image
file type count constant. As such, the registration may only happen
during module startup.
2025-07-20 12:53:57 +02:00
Niels Dossche
05bb051243 Expose gfxinfo as php_gfxinfo
This is necessary for future commits, when we extend the image handling
to support extensions adding their own handlers.
Also extend the struct with fields for when the width and height are not
numbers but strings (e.g. for SVG).
2025-07-20 12:53:57 +02:00
Niels Dossche
03a9f03822 Migrate from xmlNewNode to xmlNewDocNode (#19182)
The former is discouraged [1].

[1] https://gnome.pages.gitlab.gnome.org/libxml2/html/tree_8h.html#aa39c05fb472571ed00e38c065e67d2ec
2025-07-19 23:29:04 +02:00
Peter Kokot
68fdb43573 Remove duplicate libxml2-dev (#19185) 2025-07-19 20:33:37 +02:00
Benstone Zhang
dfac2da7fb Add support for HEIF/HEIC to getimagesize
Signed-off-by: Benstone Zhang <benstonezhang@gmail.com>
2025-07-19 19:24:45 +02:00
Niels Dossche
dd3a098a9b Disable error handler in fuzzer (#19183)
These are all the same root cause and it's known.
2025-07-19 13:08:21 +02:00
Volker Dusch
189b933dd4 RM docs: Update social media annoncement process (#19159) 2025-07-19 01:18:39 +02:00
Tim Düsterhus
6ca6d569ff bless_tests: Replace the object ID in var_dump() for namespaced classes (#19174) 2025-07-18 20:43:23 +02:00
David Carlier
2c42479890 Merge branch 'PHP-8.4' 2025-07-18 18:02:46 +01:00
David Carlier
f1a77c0198 Merge branch 'PHP-8.3' into PHP-8.4 2025-07-18 18:02:02 +01:00
Petr Sumbera
be09985c87 Fix GH-19169: ZEND_STATIC_ASSERT for -std=c++17
needs to define ZEND_STATIC_ASSERT to appropriate C++ static_assert
instead of the C version.
2025-07-18 18:00:24 +01:00
Gina Peter Banyard
b48faee850 ext/snmp: no need to use a smart_string for error message (#19171) 2025-07-18 16:43:39 +01:00
Tim Düsterhus
5fdc02282f uri: Improve exceptions for Uri\Rfc3986\Uri (#19161)
* uri: Streamline implementation of `uriparser_parse_uri_ex()`

Avoid the use of a macro and streamline the logic.

* uri: Improve exceptions for `Uri\Rfc3986\Uri`

* uri: Allow empty URIs for RFC3986

* NEWS

* uri: Improve ext/uri/tests/004.phpt for empty URIs
2025-07-18 17:38:44 +02:00
David CARLIER
063d795599 ext/intl: using a bit more modern c++ memory management features. (#19163)
not always possible (e.g. PHP objects) but when scoped we can manage
here to simplify memory managament starting with IntlDateFormat.
2025-07-18 14:10:40 +01:00
Gina Peter Banyard
419f6750c0 ext/tidy: refactor php_tidy_file_to_mem()
Pass zend_string* along
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
4433986e40 ext/tidy: Refactor php_tidy_parse_string() 2025-07-18 13:21:56 +01:00
Gina Peter Banyard
0a130caf58 ext/tidy: refactor php_tidy_set_tidy_opt()
Bring closer to unique call site and return value of it
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
01dbee83e1 ext/tidy: tidyOptGetType returns an enum that is fully checked 2025-07-18 13:21:56 +01:00
Gina Peter Banyard
aadd724362 ext/intl: Refactor IntlRuleBasedBreakIterator::__construct() (#19164)
There is no need to delegate this to a seperate function and overwrite the error handler to promote warnings
2025-07-17 23:00:05 +01:00
Tim Düsterhus
6b3f302132 streams: Re-add support for arbitrary metadata for stream notifier functions (#19158)
Support for attaching arbitrary metadata for consumption by stream notifier
functions got broken in php/php-src#19024 when the previous `zval ptr` got
changed to `zend_fcall_info_cache *fcc`, making the data specific to the
`user_space_stream_notifier`.

Fix this by changing the field to `void *ptr`, avoiding the indirection through
a `zval`, but preserving the ability to store arbitrary data. If necessary to
support different types than `IS_PTR`, extensions can heap-allocate a `zval` to
store within `->ptr` as a minimal change to keep compatibility with PHP 8.4 or
lower.
2025-07-17 23:01:43 +02:00
Tim Düsterhus
78d96e94fa zend_API: Make scope a const zend_class_entry* for zend_update_property_*() (#19156)
Follow-up for php/php-src#19060.
2025-07-17 22:11:24 +02:00
Niels Dossche
04eadc803d Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS for GH-19162
  ext/socket: Remove incorrect zval_ptr_dtor
  ext/hash: Remove incorrect zval_ptr_dtor
2025-07-17 21:53:39 +02:00
Niels Dossche
d9602e4362 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS for GH-19162
  ext/socket: Remove incorrect zval_ptr_dtor
  ext/hash: Remove incorrect zval_ptr_dtor
2025-07-17 21:52:23 +02:00
Niels Dossche
86aaded7e5 NEWS for GH-19162
Closes GH-19162.
2025-07-17 21:51:49 +02:00
Niels Dossche
d11099ae32 ext/socket: Remove incorrect zval_ptr_dtor 2025-07-17 21:50:35 +02:00
Niels Dossche
bdca73cc14 ext/hash: Remove incorrect zval_ptr_dtor 2025-07-17 21:50:35 +02:00
Tim Düsterhus
7f4076bae0 RFC: Clone with v2 (#18747)
RFC: https://wiki.php.net/rfc/clone_with_v2

Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
2025-07-17 21:13:42 +02:00
Niels Dossche
8629256dc7 Deduplicate error-handling code in finfo_open (#19149) 2025-07-17 20:45:09 +02:00
Niels Dossche
56308f6490 ext/standard/password: Use zend_string_efree() where possible (#19150) 2025-07-17 18:51:49 +02:00
Jakub Zelenka
a8a3c81528 Update NEWS for recent Curl changes [ci skip] 2025-07-17 15:00:56 +02:00
Emre Çalışkan
7fb6afbe9f Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (#19147)
This patch adds support for the CURLINFO_QUEUE_TIME_T constant in the
curl_getinfo() function when compiled with libcurl >= 8.6.0.

CURLINFO_QUEUE_TIME_T This constant allows retrieving the time (in
microseconds) that the request spent in libcurl’s connection queue
before it was sent.
2025-07-17 14:56:07 +02:00
Ilija Tovilo
0e80be83b3 Fix lineno for cpp assignment
We previously changed the lineno of the property to the cpp argument, but now
also update the lineno for RECV and ASSIGN_OBJ. No test because we don't have a
way to enable lineno's in the opcode dump, and this is not easily testable
through error messages.
2025-07-17 14:07:23 +02:00
Jakub Zelenka
a59caa3c33 Merge branch 'PHP-8.4' 2025-07-17 13:45:32 +02:00