2023-08-29 19:25:46 +00:00
|
|
|
PHP 8.4 INTERNALS UPGRADE NOTES
|
2010-08-30 10:26:31 +00:00
|
|
|
|
|
|
|
1. Internal API changes
|
2010-09-17 08:42:12 +00:00
|
|
|
|
2010-11-18 10:43:01 +00:00
|
|
|
2. Build system changes
|
|
|
|
|
2015-07-03 09:46:30 +00:00
|
|
|
3. Module changes
|
2010-11-18 10:43:01 +00:00
|
|
|
|
2021-12-09 17:15:59 +00:00
|
|
|
4. OpCode changes
|
|
|
|
|
2022-06-08 12:23:41 +00:00
|
|
|
5. SAPI changes
|
|
|
|
|
2010-08-30 10:26:31 +00:00
|
|
|
========================
|
|
|
|
1. Internal API changes
|
|
|
|
========================
|
|
|
|
|
Fix GH-12215: Module entry being overwritten causes type errors in ext/dom (PHP 8.4)
When we try to load an extension multiple times, we still overwrite the
type, module number, and handle. If the module number is used to
indicate module boundaries (e.g. in reflection and in dom, see e.g.
dom_objects_set_class_ex), then all sorts of errors can happen.
In the case of ext/dom, OP's error happens because the following
happens:
- The property handler is set up incorrectly in
dom_objects_set_class_ex() because the wrong module number is
specified. The class highest in the hierarchy is DOMNode, so the
property handler is incorrectly set to that of DOMNode instead of
DOMDocument.
- The documentElement property doesn't exist on DOMNode, it only exists
on DOMDocument, so it tries to read using zend_std_read_property().
As there is no user property called documentElement, that read
operation returns an undef value.
However, the type is still checked, resulting in the strange exception.
Solve this by changing the API such that the data is only overwritten if
it's owned data.
Closes GH-12246.
2023-09-19 18:18:55 +00:00
|
|
|
* zend_register_module_ex() now takes an additional int module_type argument.
|
|
|
|
This function will also assign the module number and type, there is no need
|
|
|
|
to do this at the call site anymore. Writing the handle should happen after
|
|
|
|
successful registration.
|
|
|
|
|
2023-10-06 17:07:37 +00:00
|
|
|
* ZPP now accepts a F or Z_PARAM_FUNC_NO_TRAMPOLINE_FREE type check.
|
|
|
|
This is identical to the 'f' or Z_PARAM_FUNC type check, except the FCC is
|
|
|
|
always initialized because it doesn't free trampolines.
|
|
|
|
Trampolines MUST be freed using zend_release_fcall_info_cache() or consumed.
|
2023-10-11 17:55:00 +00:00
|
|
|
Z_PARAM_FUNC_EX2 was added as well with the same arguments as Z_PARAM_FUNC_EX
|
|
|
|
plus an additional argument free_trampoline.
|
2023-10-06 17:07:37 +00:00
|
|
|
|
2010-11-18 10:43:01 +00:00
|
|
|
========================
|
|
|
|
2. Build system changes
|
|
|
|
========================
|
2021-08-31 17:13:49 +00:00
|
|
|
|
2023-09-14 20:21:54 +00:00
|
|
|
a. Unix build system changes
|
|
|
|
- The configure option --with-zlib-dir has been removed.
|
2023-09-22 20:31:19 +00:00
|
|
|
- Symbol COOKIE_IO_FUNCTIONS_T has been removed (use cookie_io_functions_t).
|
2023-09-14 20:21:54 +00:00
|
|
|
|
2015-01-25 21:14:40 +00:00
|
|
|
========================
|
|
|
|
3. Module changes
|
|
|
|
========================
|
2020-12-13 15:50:22 +00:00
|
|
|
|
2023-09-02 22:42:49 +00:00
|
|
|
a. ext/dom
|
|
|
|
- dom_read_t and dom_write_t now expect the function to return zend_result
|
|
|
|
instead of int.
|
2023-09-08 15:02:52 +00:00
|
|
|
- The macros DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() have been removed.
|
2023-09-02 22:42:49 +00:00
|
|
|
|
2023-10-07 12:19:54 +00:00
|
|
|
b. ext/random
|
|
|
|
- The macro RAND_RANGE_BADSCALING() has been removed. The implementation
|
|
|
|
should either be inlined and undefined behavior fixed or it should be
|
|
|
|
replaced by a non-biased scaler.
|
|
|
|
|
2023-10-21 21:48:27 +00:00
|
|
|
c. ext/xsl
|
|
|
|
- The function php_xsl_create_object() was removed as it was not used
|
|
|
|
nor exported.
|
|
|
|
|
2023-11-13 19:18:19 +00:00
|
|
|
d. ext/libxml
|
|
|
|
- Added php_libxml_pretend_ctx_error_ex() to emit errors as if they had come
|
|
|
|
from libxml.
|
|
|
|
|
2023-10-14 15:57:45 +00:00
|
|
|
e. ext/date
|
|
|
|
- Added the php_format_date_ex() API to format instances of php_date_obj.
|
2023-12-17 07:17:11 +00:00
|
|
|
- Added the php_date_initialize_from_ts_long() and
|
|
|
|
php_date_initialize_from_ts_double() to initialize a php_date_obj with
|
|
|
|
the given unix timestamp using GMT +00:00.
|
2023-10-14 15:57:45 +00:00
|
|
|
|
2023-12-11 18:43:26 +00:00
|
|
|
d. ext/pcre
|
|
|
|
- php_pcre_match_impl() now no longer has a use_flags argument.
|
|
|
|
When flags should be ignored, pass 0 to the flags argument.
|
|
|
|
- php_pcre_match_impl() and pcre_get_compiled_regex_cache_ex() now use
|
|
|
|
proper boolean argument types instead of integer types.
|
|
|
|
|
2021-12-09 17:15:59 +00:00
|
|
|
========================
|
|
|
|
4. OpCode changes
|
|
|
|
========================
|
|
|
|
|
2022-06-08 12:23:41 +00:00
|
|
|
========================
|
|
|
|
5. SAPI changes
|
|
|
|
========================
|