Skip to content

Commit ad2ac6f

Browse files
committed
Prepare for PHP 8.4
1 parent f612a72 commit ad2ac6f

File tree

7 files changed

+9
-749
lines changed

7 files changed

+9
-749
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ Currently, we have the following branches in use:
352352

353353
| Branch | |
354354
| --------- | --------- |
355-
| master | Active development branch for PHP 8.3, which is open for backwards incompatible changes and major internal API changes. |
355+
| master | Active development branch for PHP 8.4, which is open for backwards incompatible changes and major internal API changes. |
356+
| PHP-8.3 | Is used to release the PHP 8.3.x series. This is a current stable version and is open for bugfixes only. |
356357
| PHP-8.2 | Is used to release the PHP 8.2.x series. This is a current stable version and is open for bugfixes only. |
357358
| PHP-8.1 | Is used to release the PHP 8.1.x series. This is a current stable version and is open for bugfixes only. |
358359
| PHP-8.0 | Is used to release the PHP 8.0.x series. This is an old stable version and is open for security fixes only. |

UPGRADING

Lines changed: 1 addition & 606 deletions
Large diffs are not rendered by default.

UPGRADING.INTERNALS

Lines changed: 1 addition & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PHP 8.3 INTERNALS UPGRADE NOTES
1+
PHP 8.4 INTERNALS UPGRADE NOTES
22

33
1. Internal API changes
44

@@ -14,154 +14,18 @@ PHP 8.3 INTERNALS UPGRADE NOTES
1414
1. Internal API changes
1515
========================
1616

17-
* zend_class_entry now possesses a default_object_handlers field, which
18-
provides a default object handler when create_object() is not overriding it.
19-
* Custom Fiber implementations have to initialize EG(stack_limit) and
20-
EG(stack_base).
21-
* EG(opline_before_exception) may now be null if the VM throws an exception
22-
before executing any opline.
23-
* Many C header files have been cleaned up and include dependencies
24-
have been reduced. Many headers which used to be always included by
25-
Zend headers (e.g. "errno.h") are no longer implied, and this may
26-
break the build of third-party extensions which relied on this
27-
implementation detail. Those extensions may need to add the missing
28-
#include lines.
29-
* Since version 8, PHP requires a C99 compiler. Configure-time checks
30-
for C99 features have been removed and therefore macro definitions
31-
from php_config.h have disappeared. Do not use those feature
32-
macros.
33-
* Internal class aliases created during request time can now exist in
34-
the class table. zend_register_class_alias_ex() will not increase
35-
the refcount for class aliases and the cleanup function takes this
36-
into account.
37-
* The return types of the following functions have been changed from
38-
`bool` to `zend_result`:
39-
- zend_fiber_init_context()
40-
* The fast_add_function() has been removed, use add_function() that will
41-
call the static inline add_function_fast() instead.
42-
* The order of members of zend_op_array, zend_ssa_var, zend_ssa_var_info,
43-
zend_executor_globals and php_core_globals have changed to improve
44-
struct packing which reduces their size.
45-
* Many calls to zend_assign_to_variable have been replaced with
46-
zend_assign_to_variable_ex which allows delaying the releasing of the old
47-
variable value. This avoids side-effects through destructors between the
48-
assignment of the variable and the assignment to the result zval in the VM
49-
(i.e. it may free the new value). See GH-10168 for details.
50-
* The return types of the following functions were changed from int to
51-
zend_result:
52-
- open_file_for_scanning
53-
- php_rfc1867_callback
54-
- virtual_chdir
55-
- zend_execute_scripts
56-
- zend_get_module_started
57-
- zend_handle_undef_args
58-
- zend_list_delete
59-
- zend_multibyte_parse_encoding_list
60-
- zend_multibyte_set_internal_encoding
61-
- zend_parse_ini_file
62-
- zend_parse_ini_string
63-
- zend_set_user_opcode_handler
64-
- zend_ssa_inference
65-
* Removed unused macros PHP_FNV1_32A_INIT and PHP_FNV1A_64_INIT. See GH-11114.
66-
* ext/standard/hrtime.h was moved to Zend/zend_hrtime.h
67-
* The prefix of the PHP_HRTIME_ macros was changed to ZEND_HRTIME_
68-
* The HRTIME_AVAILABLE macro was renamed to ZEND_HRTIME_AVAILABLE
69-
* The php_hrtime_current() function was renamed to zend_hrtime()
70-
* _php_stream_dirent now has an extra d_type field that is used to store the
71-
directory entry type. This can be used to avoid additional stat calls for
72-
types when the type is already known.
73-
7417
========================
7518
2. Build system changes
7619
========================
7720

78-
* PHP_EXTRA_VERSION can be passed to configure script to control custom PHP
79-
build versions: ./configure PHP_EXTRA_VERSION="-acme"
80-
81-
* LDFLAGS are not unset anymore allowing them to be adjusted e.g.
82-
LDFLAGS="..." ./configure
83-
84-
* Removed the HAVE_DEV_URANDOM compile time check. HAVE_DEV_URANDOM will
85-
now never be defined. Any checks relying on HAVE_DEV_URANDOM should be
86-
removed. Even with HAVE_DEV_URANDOM it was not guaranteed that
87-
/dev/urandom is actually available at run time and thus a runtime
88-
check needs to happen in all cases.
89-
9021
========================
9122
3. Module changes
9223
========================
9324

94-
a. ext/json
95-
- A new function php_json_validate_ex has been added to check if the
96-
provided C string is valid for the given depth and options.
97-
98-
b. ext/standard
99-
- The PHPAPI php_url_encode_hash_ex() function has had its signature change
100-
from:
101-
PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
102-
const char *num_prefix, size_t num_prefix_len,
103-
const char *key_prefix, size_t key_prefix_len,
104-
const char *key_suffix, size_t key_suffix_len,
105-
zval *type, const char *arg_sep, int enc_type);
106-
to:
107-
PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
108-
const char *num_prefix, size_t num_prefix_len,
109-
const zend_string *key_prefix,
110-
zval *type, const zend_string *arg_sep, int enc_type);
111-
The change to use zend_string prevent the computation of the arg_sep
112-
length at each call. The key_suffix parameter was dropped as it was a
113-
constant value and depended on the key_prefix parameter to not be NULL.
114-
115-
c. ext/mysqlnd
116-
- The function mysqlnd_shutdown and its corresponding internal methods
117-
mysqlnd_command::shutdown & mysqlnd_conn_data::shutdown have been removed.
118-
These functions are deprecated by MySQL in favour of SHUTDOWN SQL statement.
119-
120-
d. ext/pcre
121-
- The function pcre_get_compiled_regex_ex has been removed.
122-
Use pcre_get_compiled_regex instead.
123-
124-
e. ext/spl
125-
- The PHPAPI spl_iterator_apply() function now returns zend_result instead of int.
126-
There are no functional changes.
127-
- The field _spl_filesystem_object->is_recursive has been removed.
128-
129-
f. ext/dom
130-
- A new function dom_get_doc_props_read_only() is added to gather the document
131-
properties in a read-only way. This function avoids allocation when there are
132-
no document properties changed yet.
133-
- The node list returned by DOMNode::getElementsByTagName() and
134-
DOMNode::getElementsByTagNameNS() now caches the length and the last requested item.
135-
This means that the length and the last requested item are not recalculated
136-
when the node list is iterated over multiple times.
137-
If you do not use the internal PHP dom APIs to modify the document, you need to
138-
manually invalidate the cache using php_libxml_invalidate_node_list_cache_from_doc().
139-
Furthermore, the following internal APIs were added to handle the cache:
140-
. php_dom_is_cache_tag_stale_from_doc_ptr()
141-
. php_dom_is_cache_tag_stale_from_node()
142-
. php_dom_mark_cache_tag_up_to_date_from_node()
143-
- The function dom_get_elements_by_tag_name_ns_raw() has an additional parameter to indicate
144-
the base node of the node list. This function also no longer accepts -1 as the index argument.
145-
- The function dom_namednode_iter() has additional arguments to avoid recomputing the length of
146-
the strings.
147-
- The functions dom_parent_node_prepend(), dom_parent_node_append(), dom_parent_node_after(), and
148-
dom_parent_node_before() now use an uint32_t argument for the number of nodes instead of int.
149-
- There is now a helper function php_dom_get_content_into_zval() to get the contents of a node.
150-
This avoids allocation if possible.
151-
- The function dom_set_old_ns() has been moved into ext/libxml as php_libxml_set_old_ns() and
152-
is now publicly exposed as an API.
153-
154-
g. ext/libxml
155-
- Two new functions: php_libxml_invalidate_node_list_cache_from_doc() and
156-
php_libxml_invalidate_node_list_cache() were added to invalidate the cache of a node list.
157-
15825
========================
15926
4. OpCode changes
16027
========================
16128

16229
========================
16330
5. SAPI changes
16431
========================
165-
166-
* SAPIs that may execute in alternative stacks have to set EG(stack_limit) and
167-
EG(stack_base)

Zend/zend_extensions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can use the following macro to check the extension API version for compatibi
4444

4545
/* The first number is the engine version and the rest is the date (YYYYMMDD).
4646
* This way engine 2/3 API no. is always greater than engine 1 API no.. */
47-
#define ZEND_EXTENSION_API_NO 420230831
47+
#define ZEND_EXTENSION_API_NO 420230901
4848

4949
typedef struct _zend_extension_version_info {
5050
int zend_extension_api_no;

Zend/zend_modules.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
3232
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
3333

34-
#define ZEND_MODULE_API_NO 20230831
34+
#define ZEND_MODULE_API_NO 20230901
3535
#ifdef ZTS
3636
#define USING_ZTS 1
3737
#else

main/php.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <dmalloc.h>
2323
#endif
2424

25-
#define PHP_API_VERSION 20230831
25+
#define PHP_API_VERSION 20230901
2626
#define PHP_HAVE_STREAMS
2727
#define YYDEBUG 0
2828
#define PHP_DEFAULT_CHARSET "UTF-8"

win32/build/confutils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ if (typeof(CWD) == "undefined") {
9595
if (!MODE_PHPIZE) {
9696
/* defaults; we pick up the precise versions from configure.ac */
9797
var PHP_VERSION = 8;
98-
var PHP_MINOR_VERSION = 3;
98+
var PHP_MINOR_VERSION = 4;
9999
var PHP_RELEASE_VERSION = 0;
100100
var PHP_EXTRA_VERSION = "";
101-
var PHP_VERSION_STRING = "8.3.0";
101+
var PHP_VERSION_STRING = "8.4.0";
102102
}
103103

104104
/* Get version numbers and DEFINE as a string */

0 commit comments

Comments
 (0)