Skip to content

Commit 4f2c148

Browse files
authored
Merge branch 'php:master' into с
2 parents d3ce9ec + 2039664 commit 4f2c148

File tree

159 files changed

+3305
-1875
lines changed

Some content is hidden

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

159 files changed

+3305
-1875
lines changed

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@
469469
- 'ext/pdo/php_pdo.h'
470470
- 'ext/pdo/php_pdo_driver.h'
471471
- 'ext/pdo/php_pdo_error.h'
472-
- 'ext/phar/php_phar.h'
473472
- 'ext/random/php_random.h'
474473
- 'ext/random/php_random_csprng.h'
475474
- 'ext/random/php_random_uint128.h'

NEWS

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.5.0alpha2
44

5+
- Core:
6+
. Fix OSS-Fuzz #427814452 (pipe compilation fails with assert).
7+
(nielsdos, ilutov)
8+
9+
- DOM:
10+
. Make cloning DOM node lists, maps, and collections fail. (nielsdos)
11+
. Added Dom\Element::getElementsByClassName(). (nielsdos)
12+
13+
- PDO_ODBC
14+
. Fetch larger block sizes and better handle SQL_NO_TOTAL when calling
15+
SQLGetData. (Calvin Buckley, Saki Takamachi)
16+
17+
- Standard:
18+
. Optimized pack(). (nielsdos, divinity76)
19+
. Fixed bug GH-19070 (setlocale($type, NULL) should not be deprecated).
20+
(nielsdos)
21+
522
- URI:
623
. Return the singleton UrlValidationErrorType instances from Uri\WhatWg\Url
724
instead of creating new objects that are different from the singleton.
@@ -67,6 +84,8 @@ PHP NEWS
6784
(DanielEScherzer)
6885
. Do not use RTLD_DEEPBIND if dlmopen is available. (Daniil Gentili)
6986
. Make `clone()` a function. (timwolla, edorian)
87+
. Fixed bug GH-19081 (Wrong lineno in property error with constructor property
88+
promotion). (ilutov)
7089

7190
- Curl:
7291
. Added curl_multi_get_handles(). (timwolla)
@@ -139,6 +158,11 @@ PHP NEWS
139158
. Log a warning when opcache lock file permissions could not be changed.
140159
(Taavi Eomäe)
141160

161+
- OpenSSL:
162+
. Added openssl.libctx INI that allows to select the OpenSSL library context
163+
type and convert verious parts of the extension to use the custom libctx.
164+
(Jakub Zelenka)
165+
142166
- Output:
143167
. Fixed calculation of aligned buffer size. (cmb)
144168

UPGRADING

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ PHP 8.5 UPGRADE NOTES
4545
change, but should more closely match user expectations, demonstrated by
4646
GH-15753 and GH-16198.
4747

48+
- DOM:
49+
. Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList,
50+
Dom\HTMLCollection, and Dom\DtdNamedNodeMap now fails.
51+
This never actually resulted in a working object,
52+
so the impact should actually be zero.
53+
4854
- FileInfo:
4955
. finfo_file() and finfo::file() now throws a ValueError instead of a
5056
TypeError when $filename contains nul bytes.
@@ -259,6 +265,19 @@ PHP 8.5 UPGRADE NOTES
259265
4. Deprecated Functionality
260266
========================================
261267

268+
- Core:
269+
. Returning a non-string from a user output handler is deprecated. The
270+
deprecation warning will bypass the handler with the bad return to ensure
271+
it is visible; if there are nested output handlers the next one will still
272+
be used.
273+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
274+
. Trying to produce output (e.g. with `echo`) within a user output handler
275+
is deprecated. The deprecation warning will bypass the handler producing the
276+
output to ensure it is visible; if there are nested output handlers the next
277+
one will still be used. If a user output handler returns a non-string and
278+
produces output, the warning about producing an output is emitted first.
279+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
280+
262281
- Hash:
263282
. The MHASH_* constants have been deprecated. These have been overlooked
264283
when the mhash*() function family has been deprecated per
@@ -389,6 +408,7 @@ PHP 8.5 UPGRADE NOTES
389408
RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
390409

391410
- DOM:
411+
. Added Dom\Element::getElementsByClassName().
392412
. Added Dom\Element::insertAdjacentHTML().
393413

394414
- Enchant:
@@ -538,6 +558,11 @@ PHP 8.5 UPGRADE NOTES
538558
from being a multiple of loop iteration counts.
539559
It is recommended that this parameter is set to a prime number.
540560

561+
- OpenSSL:
562+
Added openssl.libctx to select the OpenSSL library context type. Either
563+
custom libctx for each thread can be used or a single global (default)
564+
libctx is used.
565+
541566
========================================
542567
12. Windows Support
543568
========================================
@@ -586,6 +611,13 @@ PHP 8.5 UPGRADE NOTES
586611
. The `-z` or `--zend-extension` option has been removed as it was
587612
non-functional. Use `-d zend_extension=<path>` instead.
588613

614+
- PDO_ODBC
615+
. The fetch behaviour for larger columns has been changed. Rather than
616+
fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size;
617+
currently, this is the page size minus string overhead. Drivers that
618+
return SQL_NO_TOTAL in SQLGetData are also better handled as well.
619+
This should improve compatibility and performance. See GH-10809, GH-10733.
620+
589621
========================================
590622
14. Performance Improvements
591623
========================================
@@ -619,6 +651,7 @@ PHP 8.5 UPGRADE NOTES
619651
. Improved performance of urlencode() and rawurlencode().
620652
. Improved unpack() performance with nameless repetitions by avoiding
621653
creating temporary strings and reparsing them.
654+
. Improved pack() performance.
622655

623656
- XMLReader:
624657
. Improved property access performance.

UPGRADING.INTERNALS

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,29 @@ PHP 8.5 INTERNALS UPGRADE NOTES
4343
. Added the zend_update_exception_properties() function for instantiating
4444
Exception child classes. It updates the $message, $code, and $previous
4545
properties.
46+
. zend_exception_get_default() was removed, use zend_ce_exception directly.
47+
. zend_get_error_exception() was removed, use zend_ce_error_exception
48+
directly.
4649
. ZEND_IS_XDIGIT() macro was removed because it was unused and its name
4750
did not match its actual behavior.
51+
. The following zend_string-related legacy aliases were removed:
52+
* IS_INTERNED() - use ZSTR_IS_INTERNED()
53+
* STR_EMPTY_ALLOC() - use ZSTR_EMPTY_ALLOC()
54+
* _STR_HEADER_SIZE - use _ZSTR_HEADER_SIZE
55+
* STR_ALLOCA_ALLOC() - use ZSTR_ALLOCA_ALLOC()
56+
* STR_ALLOCA_INIT() - use ZSTR_ALLOCA_INIT()
57+
* STR_ALLOCA_FREE() - use ZSTR_ALLOCA_FREE()
4858
. zend_register_constant() now returns a pointer to the added constant
4959
on success and NULL on failure instead of SUCCESS/FAILURE.
60+
The specialized registration methods that previously had void returns
61+
also return pointers to the added constants:
62+
* zend_register_bool_constant()
63+
* zend_register_null_constant()
64+
* zend_register_long_constant()
65+
* zend_register_double_constant()
66+
* zend_register_string_constant()
67+
* zend_register_stringl_constant()
68+
. EG(fake_scope) now is a _const_ zend_class_entry*.
5069

5170
========================
5271
2. Build system changes
@@ -57,7 +76,7 @@ PHP 8.5 INTERNALS UPGRADE NOTES
5776
. Preprocessor macro SIZEOF_INTMAX_T has been removed.
5877

5978
- Windows build system changes
60-
. SAPI() and ADD_SOURCES() now suport the optional `duplicate_sources`
79+
. SAPI() and ADD_SOURCES() now support the optional `duplicate_sources`
6180
parameter. If truthy, no rules to build the object files are generated.
6281
This allows to build additional variants of SAPIs (e.g. a DLL and EXE)
6382
without duplicate build rules. It is up to the SAPI maintainers to ensure

Zend/Optimizer/zend_func_infos.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ static const func_info_t func_infos[] = {
131131
F1("imagecreatefromgd", MAY_BE_OBJECT|MAY_BE_FALSE),
132132
F1("imagecreatefromgd2", MAY_BE_OBJECT|MAY_BE_FALSE),
133133
F1("imagecreatefromgd2part", MAY_BE_OBJECT|MAY_BE_FALSE),
134-
#if defined(HAVE_GD_BMP)
135134
F1("imagecreatefrombmp", MAY_BE_OBJECT|MAY_BE_FALSE),
136-
#endif
137135
F1("imagecolorsforindex", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG),
138136
F1("imagegetclip", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG),
139137
#if defined(HAVE_GD_FREETYPE)

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ static const zend_property_info *lookup_prop_info(const zend_class_entry *ce, ze
24092409
/* If the class is linked, reuse the precise runtime logic. */
24102410
if ((ce->ce_flags & ZEND_ACC_LINKED)
24112411
&& (!scope || (scope->ce_flags & ZEND_ACC_LINKED))) {
2412-
zend_class_entry *prev_scope = EG(fake_scope);
2412+
const zend_class_entry *prev_scope = EG(fake_scope);
24132413
EG(fake_scope) = scope;
24142414
prop_info = zend_get_property_info(ce, name, 1);
24152415
EG(fake_scope) = prev_scope;

Zend/Zend.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ AC_CHECK_FUNCS(m4_normalize([
149149
pthread_get_stackaddr_np
150150
pthread_getattr_np
151151
pthread_stackseg_np
152+
strnlen
152153
]))
153154
154155
AC_CHECK_DECL([clock_gettime_nsec_np],

Zend/tests/concat/bug79836.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $counter = 0;
88
ob_start(function ($buffer) use (&$c, &$counter) {
99
$c = 0;
1010
++$counter;
11+
return '';
1112
}, 1);
1213
$c .= [];
1314
$c .= [];

Zend/tests/concat/bug79836_1.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ opcache.optimization_level = 0x7FFEBFFF & ~0x400
77
$x = 'non-empty';
88
ob_start(function () use (&$c) {
99
$c = 0;
10+
return '';
1011
}, 1);
1112
$c = [];
1213
$x = $c . $x;

Zend/tests/concat/bug79836_2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ $c = str_repeat("abcd", 10);
66

77
ob_start(function () use (&$c) {
88
$c = 0;
9+
return '';
910
}, 1);
1011

1112
class X {

0 commit comments

Comments
 (0)