Skip to content

Commit bead416

Browse files
committed
Merge branch 'master' into func-composition
2 parents 70b1b46 + 2036c71 commit bead416

File tree

180 files changed

+4184
-1109
lines changed

Some content is hidden

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

180 files changed

+4184
-1109
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
/ext/gmp @Girgias
2828
/ext/intl @devnexen
2929
/ext/json @bukka
30+
/ext/lexbor @kocsismate @nielsdos
3031
/ext/libxml @nielsdos
3132
/ext/mbstring @alexdowad @youkidearitai
3233
/ext/mysqli @bukka @kamil-tekiela
@@ -51,6 +52,7 @@
5152
/ext/sockets @devnexen
5253
/ext/spl @Girgias
5354
/ext/standard @bukka
55+
/ext/uri @kocsismate
5456
/ext/xml @nielsdos
5557
/ext/xmlreader @nielsdos
5658
/ext/xmlwriter @nielsdos

NEWS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ PHP NEWS
5252
. Fixed bugs GH-17711 and GH-18022 (Infinite recursion on deprecated attribute
5353
evaluation) and GH-18464 (Recursion protection for deprecation constants not
5454
released on bailout). (DanielEScherzer and ilutov)
55+
. Fixed AST printing for immediately invoked Closure. (Dmitrii Derepko)
56+
. Properly handle __debugInfo() returning an array reference. (nielsdos)
5557

5658
- Curl:
5759
. Added curl_multi_get_handles(). (timwolla)
@@ -70,6 +72,7 @@ PHP NEWS
7072
- Enchant:
7173
. Added enchant_dict_remove_from_session(). (nielsdos)
7274
. Added enchant_dict_remove(). (nielsdos)
75+
. Fix missing empty string checks. (nielsdos)
7376

7477
- EXIF:
7578
. Add OffsetTime* Exif tags. (acc987)
@@ -119,6 +122,8 @@ PHP NEWS
119122
. Fixed ZTS OPcache build on Cygwin. (cmb)
120123
. Added opcache.file_cache_read_only. (Samuel Melrose)
121124
. Updated default value of opcache.jit_hot_loop. (Arnaud)
125+
. Log a warning when opcache lock file permissions could not be changed.
126+
(Taavi Eomäe)
122127

123128
- Output:
124129
. Fixed calculation of aligned buffer size. (cmb)
@@ -137,6 +142,10 @@ PHP NEWS
137142
- PDO_SQLITE:
138143
. throw on null bytes / resolve GH-13952 (divinity76).
139144
. Implement GH-17321: Add setAuthorizer to Pdo\Sqlite. (nielsdos)
145+
. PDO::sqliteCreateCollation now throws a TypeError if the callback
146+
has a wrong return type. (David Carlier)
147+
. Added Pdo_Sqlite::ATTR_BUSY_STATEMENT constant to check
148+
if a statement is currently executing. (David Carlier)
140149

141150
- PGSQL:
142151
. Added pg_close_stmt to close a prepared statement while allowing
@@ -183,6 +192,11 @@ PHP NEWS
183192
- SOAP:
184193
. Fixed bug #49169 (SoapServer calls wrong function, although "SOAP action"
185194
header is correct). (nielsdos)
195+
. Fix namespace handling of WSDL and XML schema in SOAP,
196+
fixing at least GH-16320 and bug #68576. (nielsdos)
197+
. Fixed bug #70951 (Segmentation fault on invalid WSDL cache). (nielsdos)
198+
. Implement request #55503 (Extend __getTypes to support enumerations).
199+
(nielsdos, datibbaw)
186200

187201
- Sockets:
188202
. Added IPPROTO_ICMP/IPPROTO_ICMPV6 to create raw socket for ICMP usage.
@@ -235,6 +249,10 @@ PHP NEWS
235249
- Tests:
236250
. Allow to shuffle tests even in non-parallell mode. (dhuang00)
237251

252+
- Tidy:
253+
. tidy::__construct/parseFile/parseString methods throw an exception if
254+
the configuration argument is invalid. (David Carlier)
255+
238256
- Windows:
239257
. Fixed bug GH-10992 (Improper long path support for relative paths). (cmb,
240258
nielsdos)

UPGRADING

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ PHP 8.5 UPGRADE NOTES
4242
have run and the output handlers have been cleaned up.
4343
This is a consequence of fixing GH-18033.
4444
. Traits are now bound before the parent class. This is a subtle behavioral
45-
change, but should closer match user expectations, demonstrated by GH-15753
46-
and GH-16198.
45+
change, but should more closely match user expectations, demonstrated by
46+
GH-15753 and GH-16198.
4747

4848
- FileInfo:
4949
. finfo_file() and finfo::file() now throws a ValueError instead of a
@@ -91,7 +91,7 @@ PHP 8.5 UPGRADE NOTES
9191
argument when fetching into an object, will now throw an Error.
9292
. The value of the constants PDO::FETCH_GROUP, PDO::FETCH_UNIQUE,
9393
PDO::FETCH_CLASSTYPE, PDO::FETCH_PROPS_LATE, and PDO::FETCH_SERIALIZE
94-
has changed.
94+
have changed.
9595
. A ValueError is now thrown if PDO::FETCH_PROPS_LATE is used with a fetch
9696
mode different than PDO::FETCH_CLASS, consistent with other fetch flags.
9797
. A ValueError is now thrown if PDO::FETCH_INTO is used as a fetch mode in
@@ -158,7 +158,7 @@ PHP 8.5 UPGRADE NOTES
158158
CURLINFO_USED_PROXY gets zero set if no proxy was used in the
159159
previous transfer or a non-zero value if a proxy was used.
160160
CURLINFO_HTTPAUTH_USED and CURLINFO_PROXYAUTH_USED get bitmasks
161-
indicating the http and proxy authentication methods that were
161+
indicating the HTTP and proxy authentication methods that were
162162
used in the previous request. See CURLAUTH_* constants for
163163
possible values.
164164
. Added CURLOPT_INFILESIZE_LARGE Curl option, which is a safe
@@ -168,10 +168,10 @@ PHP 8.5 UPGRADE NOTES
168168
accepts the largest integer value the system can handle.
169169
. Added CURLFOLLOW_OBEYCODE, CURLFOLLOW_FIRSTONLY and CURLFOLLOW_ALL values for
170170
CURLOPT_FOLLOWLOCATION curl_easy_setopt option.
171-
CURLFOLLOW_OBEYCODE to follow more strictly in regard of redirect
171+
CURLFOLLOW_OBEYCODE to follow more strictly in regard to redirect
172172
if they are allowed. CURLFOLLOW_FIRSTONLY to follow only the
173-
first redirect thus if there any follow up redirect, it won't go
174-
any further. CURLFOLLOW_ALL is equivalent to set CURLOPT_FOLLOWLOCATION
173+
first redirect thus if there is any follow up redirect, it won't go
174+
any further. CURLFOLLOW_ALL is equivalent to setting CURLOPT_FOLLOWLOCATION
175175
to true.
176176

177177
- DOM:
@@ -187,13 +187,19 @@ PHP 8.5 UPGRADE NOTES
187187
number formats.
188188
. Added Locale::addLikelySubtags and Locale::minimizeSubtags to
189189
handle likely tags on a given locale.
190-
. Added IntlListFormatter class to format, order, punctuates
190+
. Added IntlListFormatter class to format, order, and punctuate
191191
a list of items with a given locale, IntlListFormatter::TYPE_AND,
192192
IntlListFormatter::TYPE_OR, IntlListFormatter::TYPE_UNITS operands and
193193
IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT and
194194
IntlListFormatter::WIDTH_NARROW widths.
195195
It is supported from icu 67.
196196

197+
- PDO_Sqlite:
198+
. Added class constant Pdo_Sqlite::ATTR_BUSY_STATEMENT.
199+
200+
- SOAP:
201+
. Enumeration cases are now dumped in __getTypes().
202+
197203
- XSL:
198204
. The $namespace argument of XSLTProcessor::getParameter(),
199205
XSLTProcessor::setParameter() and XSLTProcessor::removeParameter()
@@ -247,7 +253,7 @@ PHP 8.5 UPGRADE NOTES
247253
was actually never possible.
248254

249255
- LDAP:
250-
. ldap_get_option() now accept a NULL connection, as ldap_set_option(),
256+
. ldap_get_option() now accepts a NULL connection, as ldap_set_option(),
251257
to allow retrieval of global options.
252258

253259
- libxml:
@@ -260,11 +266,14 @@ PHP 8.5 UPGRADE NOTES
260266
. PDO::pgsqlCopyFromArray also supports inputs as Iterable.
261267
. Pdo\Pgsql::setAttribute and Pdo\Pgsql::prepare supports
262268
PDO::ATTR_PREFETCH sets to 0 which set to lazy fetch mode.
263-
In this mode, statements cannot be run parallely.
269+
In this mode, statements cannot be run in parallel.
264270

265271
- PDO_SQLITE:
266272
. SQLite PDO::quote() will now throw an exception or emit a warning,
267273
depending on the error mode, if the string contains a null byte.
274+
. PDO::sqliteCreateCollation will now throw an exception
275+
if the callback has the wrong return type, making it more
276+
in line with Pdo_Sqlite::createCollation behavior.
268277

269278
- PGSQL:
270279
. pg_copy_from also supports inputs as Iterable.
@@ -287,7 +296,7 @@ PHP 8.5 UPGRADE NOTES
287296
are enum cases rather than normal class constants.
288297

289298
- Session:
290-
. session_start is stricter in regard of the option argument.
299+
. session_start is stricter in regard to the option argument.
291300
It throws a ValueError if the whole is not a hashmap or
292301
a TypeError if read_on_close value is not a valid type
293302
compatible with int.
@@ -304,7 +313,7 @@ PHP 8.5 UPGRADE NOTES
304313
ValueError if the port is lower than 0 or greater than 65535,
305314
also if any of the hints array entry is indexes numerically.
306315
. socket_addrinfo_lookup throws a TypeError if any of the hints
307-
values cannot be cast to a int and can throw a ValueError if
316+
values cannot be cast to int and can throw a ValueError if
308317
any of these values overflow.
309318
. socket_set_option with MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP
310319
options will throw an exception if the value isn't a valid object
@@ -313,6 +322,12 @@ PHP 8.5 UPGRADE NOTES
313322
. socket_getsockname gets the interface index and its string
314323
representation with AF_PACKET socket.
315324

325+
- Tidy:
326+
. tidy::__construct/parseFile/parseString now throws a ValueError
327+
if the configuration contains an invalid or set a read-only
328+
internal entry, a TypeError contains, at least, one element
329+
when the key is not a string.
330+
316331
- Zlib:
317332
. The "use_include_path" argument for the
318333
gzfile, gzopen and readgzfile functions had been changed
@@ -412,6 +427,9 @@ PHP 8.5 UPGRADE NOTES
412427
- PCRE:
413428
. Upgraded to pcre2lib from 10.44 to 10.45.
414429

430+
- PDO_Sqlite:
431+
. Increased minimum release version support from 3.7.7 to 3.7.17.
432+
415433
- Readline:
416434
. The return types of readline_add_history(), readline_clear_history(), and
417435
readline_callback_handler_install() have been changed to true, rather
@@ -456,6 +474,9 @@ PHP 8.5 UPGRADE NOTES
456474
- SHUT_WR.
457475
- SHUT_RDWR.
458476

477+
- Tokenizer:
478+
. T_VOID_CAST.
479+
459480
========================================
460481
11. Changes to INI File Handling
461482
========================================
@@ -543,7 +564,7 @@ PHP 8.5 UPGRADE NOTES
543564
. Now avoids creating extra string copies when converting strings
544565
for use in the collator.
545566

546-
MBString:
567+
- MBString:
547568
. The parts of the code that used SSE2 have been adapted to use SIMD
548569
with ARM NEON as well.
549570

UPGRADING.INTERNALS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ PHP 8.5 INTERNALS UPGRADE NOTES
4646
without duplicate build rules. It is up to the SAPI maintainers to ensure
4747
that appropriate build rules are created.
4848

49+
- Linux build system changes
50+
. libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex lib64)
51+
configure options are used to ${libdir}/php (ex: /usr/lib64/php)
52+
4953
========================
5054
3. Module changes
5155
========================
@@ -62,6 +66,7 @@ PHP 8.5 INTERNALS UPGRADE NOTES
6266

6367
- ext/libxml
6468
. The refcount APIs now return an `unsigned int` instead of an `int`.
69+
. Removed php_libxml_xmlCheckUTF8(). Use xmlCheckUTF8() from libxml instead.
6570

6671
- ext/pdo
6772
. Added `php_pdo_stmt_valid_db_obj_handle()` to check if the database object
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
__debugInfo with reference return
3+
--FILE--
4+
<?php
5+
6+
class Test {
7+
private $tmp = ['x' => 1];
8+
9+
public function &__debugInfo(): array
10+
{
11+
return $this->tmp;
12+
}
13+
}
14+
15+
var_dump(new Test);
16+
17+
?>
18+
--EXPECT--
19+
object(Test)#1 (1) {
20+
["x"]=>
21+
int(1)
22+
}

Zend/tests/arrow_functions/007.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ zend.assertions=1
55
--FILE--
66
<?php
77

8-
// TODO We're missing parentheses for the direct call
9-
108
try {
119
assert((fn() => false)());
1210
} catch (AssertionError $e) {
@@ -21,5 +19,5 @@ try {
2119

2220
?>
2321
--EXPECT--
24-
assert(): assert(fn() => false()) failed
25-
assert(): assert(fn&(int ...$args): ?bool => $args[0](false)) failed
22+
assert(): assert((fn() => false)()) failed
23+
assert(): assert((fn&(int ...$args): ?bool => $args[0])(false)) failed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
Serialization of floats are correct
3+
--INI--
4+
zend.assertions=1
5+
--FILE--
6+
<?php
7+
try {
8+
assert(!is_float(0.0));
9+
} catch (AssertionError $e) {
10+
echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL;
11+
}
12+
try {
13+
assert(!is_float(1.1));
14+
} catch (AssertionError $e) {
15+
echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL;
16+
}
17+
try {
18+
assert(!is_float(1234.5678));
19+
} catch (AssertionError $e) {
20+
echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL;
21+
}
22+
?>
23+
--EXPECT--
24+
assert(): assert(!is_float(0.0)) failed
25+
assert(): assert(!is_float(1.1)) failed
26+
assert(): assert(!is_float(1234.5678)) failed

Zend/tests/e_strict-deprecated.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ var_dump(E_STRICT);
1010
--EXPECTF--
1111
int(30719)
1212

13-
Deprecated: Constant E_STRICT is deprecated in %s on line %d
13+
Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in %s on line %d
1414
int(2048)

Zend/tests/enum/ast-dumper.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ try {
2828

2929
?>
3030
--EXPECT--
31-
assert(function () {
31+
assert((function () {
3232
enum Foo {
3333
case Bar;
3434
}
@@ -45,4 +45,4 @@ assert(function () {
4545
}
4646

4747
return false;
48-
}())
48+
})())
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--TEST--
2+
Exception properties are overridden by property hooks
3+
--FILE--
4+
<?php
5+
class MyException extends Exception
6+
{
7+
private bool $modified = false;
8+
9+
protected $code {
10+
set($value) {
11+
if ($this->modified) {
12+
throw new Exception();
13+
} else {
14+
$this->modified = true;
15+
16+
$this->code = $value;
17+
}
18+
}
19+
}
20+
}
21+
22+
$e = new MyException("foo", 1, new Exception());
23+
24+
try {
25+
$e->__construct("bar", 2, null);
26+
} catch (Exception) {
27+
}
28+
29+
var_dump($e->getMessage());
30+
var_dump($e->getCode());
31+
var_dump($e->getPrevious()::class);
32+
33+
?>
34+
--EXPECTF--
35+
string(3) "bar"
36+
int(1)
37+
string(9) "Exception"

0 commit comments

Comments
 (0)