Skip to content

Commit d293045

Browse files
committed
Merge branch 'master' into uri-whatwg-memory-management
2 parents e95083b + 90822f7 commit d293045

File tree

173 files changed

+1806
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1806
-921
lines changed

NEWS

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? ????, PHP 8.5.0beta2
3+
?? ??? ????, PHP 8.5.0beta3
4+
5+
- Session:
6+
. Fix RC violation of session SID constant deprecation attribute. (ilutov)
7+
8+
28 Aug 2025, PHP 8.5.0beta2
49

510
- Core:
611
. Fixed bug GH-18850 (Repeated inclusion of file with __halt_compiler()
@@ -29,6 +34,9 @@ PHP NEWS
2934
(ilutov)
3035
. Prohibit pipe & arrow function combination that leads to confusing parse
3136
trees. (ilutov)
37+
. The disable_classes INI directive has been removed. (Girgias)
38+
. The locally predefined variable $http_response_header is deprecated.
39+
(Girgias)
3240

3341
- Filter:
3442
. Added support for configuring the URI parser for FILTER_VALIDATE_URL
@@ -45,6 +53,9 @@ PHP NEWS
4553
. Implement #81724 (openssl_cms_encrypt only allows specific ciphers).
4654
(Jakub Zelenka)
4755

56+
- PDO:
57+
. Driver specific constants in the PDO class are now deprecated. (Arnaud)
58+
4859
- Phar:
4960
. Fixed memory leaks when verifying OpenSSL signature. (Girgias)
5061

UPGRADING

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ PHP 8.5 UPGRADE NOTES
1919
1. Backward Incompatible Changes
2020
========================================
2121

22-
- BZ2:
23-
. bzcompress() now throws a ValueError when $block_size is not between
24-
1 and 9.
25-
. bzcompress() now throws a ValueError when $work_factor is not between
26-
0 and 250.
27-
2822
- Core:
2923
. It is no longer possible to use "array" and "callable" as class alias names
3024
in class_alias().
@@ -55,6 +49,15 @@ PHP 8.5 UPGRADE NOTES
5549
ReflectionAttribute::newInstance() was called an error would be thrown.
5650
The error can be delayed from compilation to runtime using the new
5751
#[\DelayedTargetValidation] attribute.
52+
. The disable_classes INI setting has been removed as it causes various
53+
engine assumptions to be broken.
54+
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#remove_disable_classes_ini_setting
55+
56+
- BZ2:
57+
. bzcompress() now throws a ValueError when $block_size is not between
58+
1 and 9.
59+
. bzcompress() now throws a ValueError when $work_factor is not between
60+
0 and 250.
5861

5962
- DOM:
6063
. Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList,
@@ -424,6 +427,51 @@ PHP 8.5 UPGRADE NOTES
424427
. The "uri:" DSN scheme has been deprecated due to security concerns with
425428
DSNs coming from remote URIs.
426429
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_pdo_s_urischeme
430+
. Driver specific constants in the PDO class have been deprecated.
431+
List of affected constants and their replacement:
432+
PDO::DBLIB_ATTR_CONNECTION_TIMEOUT => Pdo\Dblib::ATTR_CONNECTION_TIMEOUT
433+
PDO::DBLIB_ATTR_QUERY_TIMEOUT => Pdo\Dblib::ATTR_QUERY_TIMEOUT
434+
PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER => Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER
435+
PDO::DBLIB_ATTR_VERSION => Pdo\Dblib::ATTR_VERSION
436+
PDO::DBLIB_ATTR_TDS_VERSION => Pdo\Dblib::ATTR_TDS_VERSION
437+
PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS => Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS
438+
PDO::DBLIB_ATTR_DATETIME_CONVERT => Pdo\Dblib::ATTR_DATETIME_CONVERT
439+
PDO::FB_ATTR_DATE_FORMAT => Pdo\Firebird::ATTR_DATE_FORMAT
440+
PDO::FB_ATTR_TIME_FORMAT => Pdo\Firebird::ATTR_TIME_FORMAT
441+
PDO::FB_ATTR_TIMESTAMP_FORMAT => Pdo\Firebird::ATTR_TIMESTAMP_FORMAT
442+
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => Pdo\Mysql::ATTR_USE_BUFFERED_QUERY
443+
PDO::MYSQL_ATTR_LOCAL_INFILE => Pdo\Mysql::ATTR_LOCAL_INFILE
444+
PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY => Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY
445+
PDO::MYSQL_ATTR_INIT_COMMAND => Pdo\Mysql::ATTR_INIT_COMMAND
446+
PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => Pdo\Mysql::ATTR_MAX_BUFFER_SIZE
447+
PDO::MYSQL_ATTR_READ_DEFAULT_FILE => Pdo\Mysql::ATTR_READ_DEFAULT_FILE
448+
PDO::MYSQL_ATTR_READ_DEFAULT_GROUP => Pdo\Mysql::ATTR_READ_DEFAULT_GROUP
449+
PDO::MYSQL_ATTR_COMPRESS => Pdo\Mysql::ATTR_COMPRESS
450+
PDO::MYSQL_ATTR_DIRECT_QUERY => Pdo\Mysql::ATTR_DIRECT_QUERY
451+
PDO::MYSQL_ATTR_FOUND_ROWS => Pdo\Mysql::ATTR_FOUND_ROWS
452+
PDO::MYSQL_ATTR_IGNORE_SPACE => Pdo\Mysql::ATTR_IGNORE_SPACE
453+
PDO::MYSQL_ATTR_SSL_KEY => Pdo\Mysql::ATTR_SSL_KEY
454+
PDO::MYSQL_ATTR_SSL_CERT => Pdo\Mysql::ATTR_SSL_CERT
455+
PDO::MYSQL_ATTR_SSL_CA => Pdo\Mysql::ATTR_SSL_CA
456+
PDO::MYSQL_ATTR_SSL_CAPATH => Pdo\Mysql::ATTR_SSL_CAPATH
457+
PDO::MYSQL_ATTR_SSL_CIPHER => Pdo\Mysql::ATTR_SSL_CIPHER
458+
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT
459+
PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY => Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY
460+
PDO::MYSQL_ATTR_MULTI_STATEMENTS => Pdo\Mysql::ATTR_MULTI_STATEMENTS
461+
PDO::ODBC_ATTR_USE_CURSOR_LIBRARY => Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY
462+
PDO::ODBC_ATTR_ASSUME_UTF8 => Pdo\Odbc::ATTR_ASSUME_UTF8
463+
PDO::ODBC_SQL_USE_IF_NEEDED => Pdo\Odbc::SQL_USE_IF_NEEDED
464+
PDO::ODBC_SQL_USE_DRIVER => Pdo\Odbc::SQL_USE_DRIVER
465+
PDO::ODBC_SQL_USE_ODBC => Pdo\Odbc::SQL_USE_ODBC
466+
PDO::PGSQL_ATTR_DISABLE_PREPARES => Pdo\Pgsql::ATTR_DISABLE_PREPARES
467+
PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES => Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES
468+
PDO::SQLITE_ATTR_OPEN_FLAGS => Pdo\Sqlite::OPEN_FLAGS
469+
PDO::SQLITE_ATTR_READONLY_STATEMENT => Pdo\Sqlite::ATTR_READONLY_STATEMENT
470+
PDO::SQLITE_DETERMINISTIC => Pdo\Sqlite::DETERMINISTIC
471+
PDO::SQLITE_OPEN_READONLY => Pdo\Sqlite::OPEN_READONLY
472+
PDO::SQLITE_OPEN_READWRITE => Pdo\Sqlite::OPEN_READWRITE
473+
PDO::SQLITE_OPEN_CREATE => Pdo\Sqlite::OPEN_CREATE
474+
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_pdo_constants_and_methods
427475

428476
- Reflection:
429477
. The setAccessible() methods of various Reflection objects have been
@@ -461,6 +509,9 @@ PHP 8.5 UPGRADE NOTES
461509
. Passing integers outside the interval [0, 255] to chr() is now deprecated.
462510
This is because a byte can only hold a value within this interval.
463511
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers_outside_the_interval_0_255_to_chr
512+
. Relying locally predefined variable $http_response_header is deprecated.
513+
Instead one should call the http_get_last_response_headers() function.
514+
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
464515

465516
- XML:
466517
. The xml_parser_free() function has been deprecated, as XMLParser objects

Zend/tests/bug77494.phpt

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
Check that warning is emitted when disabling classes
3+
--INI--
4+
disable_classes=Exception
5+
--FILE--
6+
<?php
7+
$o = new Exception();
8+
var_dump($o);
9+
?>
10+
--EXPECTF--
11+
object(Exception)#1 (7) {
12+
["message":protected]=>
13+
string(0) ""
14+
["string":"Exception":private]=>
15+
string(0) ""
16+
["code":protected]=>
17+
int(0)
18+
["file":protected]=>
19+
string(%d) "%s"
20+
["line":protected]=>
21+
int(2)
22+
["trace":"Exception":private]=>
23+
array(0) {
24+
}
25+
["previous":"Exception":private]=>
26+
NULL
27+
}

Zend/tests/errmsg/errmsg_021.phpt

Lines changed: 0 additions & 17 deletions
This file was deleted.

Zend/zend_API.c

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3692,77 +3692,6 @@ ZEND_API void zend_disable_functions(const char *function_list) /* {{{ */
36923692
}
36933693
/* }}} */
36943694

3695-
#ifdef ZEND_WIN32
3696-
#pragma optimize("", off)
3697-
#endif
3698-
static ZEND_COLD zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */
3699-
{
3700-
zend_object *intern;
3701-
3702-
intern = zend_objects_new(class_type);
3703-
3704-
/* Initialize default properties */
3705-
if (EXPECTED(class_type->default_properties_count != 0)) {
3706-
zval *p = intern->properties_table;
3707-
zval *end = p + class_type->default_properties_count;
3708-
do {
3709-
ZVAL_UNDEF(p);
3710-
p++;
3711-
} while (p != end);
3712-
}
3713-
3714-
zend_error(E_WARNING, "%s() has been disabled for security reasons", ZSTR_VAL(class_type->name));
3715-
return intern;
3716-
}
3717-
#ifdef ZEND_WIN32
3718-
#pragma optimize("", on)
3719-
#endif
3720-
/* }}} */
3721-
3722-
static const zend_function_entry disabled_class_new[] = {
3723-
ZEND_FE_END
3724-
};
3725-
3726-
ZEND_API zend_result zend_disable_class(const char *class_name, size_t class_name_length) /* {{{ */
3727-
{
3728-
zend_class_entry *disabled_class;
3729-
zend_string *key;
3730-
zend_function *fn;
3731-
zend_property_info *prop;
3732-
3733-
key = zend_string_alloc(class_name_length, 0);
3734-
zend_str_tolower_copy(ZSTR_VAL(key), class_name, class_name_length);
3735-
disabled_class = zend_hash_find_ptr(CG(class_table), key);
3736-
zend_string_release_ex(key, 0);
3737-
if (!disabled_class) {
3738-
return FAILURE;
3739-
}
3740-
3741-
/* Will be reset by INIT_CLASS_ENTRY. */
3742-
free(disabled_class->interfaces);
3743-
3744-
INIT_CLASS_ENTRY_INIT_METHODS((*disabled_class), disabled_class_new);
3745-
disabled_class->create_object = display_disabled_class;
3746-
3747-
ZEND_HASH_MAP_FOREACH_PTR(&disabled_class->function_table, fn) {
3748-
if ((fn->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) &&
3749-
fn->common.scope == disabled_class) {
3750-
zend_free_internal_arg_info(&fn->internal_function);
3751-
}
3752-
} ZEND_HASH_FOREACH_END();
3753-
zend_hash_clean(&disabled_class->function_table);
3754-
ZEND_HASH_MAP_FOREACH_PTR(&disabled_class->properties_info, prop) {
3755-
if (prop->ce == disabled_class) {
3756-
zend_string_release(prop->name);
3757-
zend_type_release(prop->type, /* persistent */ 1);
3758-
free(prop);
3759-
}
3760-
} ZEND_HASH_FOREACH_END();
3761-
zend_hash_clean(&disabled_class->properties_info);
3762-
return SUCCESS;
3763-
}
3764-
/* }}} */
3765-
37663695
static zend_always_inline zend_class_entry *get_scope(zend_execute_data *frame)
37673696
{
37683697
return frame && frame->func ? frame->func->common.scope : NULL;

Zend/zend_API.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ static zend_always_inline zend_result zend_register_class_alias(const char *name
405405
zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce, 1)
406406

407407
ZEND_API void zend_disable_functions(const char *function_list);
408-
ZEND_API zend_result zend_disable_class(const char *class_name, size_t class_name_length);
409408

410409
ZEND_API ZEND_COLD void zend_wrong_param_count(void);
411410
ZEND_API ZEND_COLD void zend_wrong_property_read(zval *object, zval *property);

0 commit comments

Comments
 (0)