Skip to content

Commit b658893

Browse files
committed
Merge branch 'true-async-api' into true-async
# Conflicts: # .gitignore # Zend/zend_async_API.c # Zend/zend_async_API.h # Zend/zend_execute_API.c # main/main.c # win32/build/config.w32
2 parents bad113e + 4310a08 commit b658893

File tree

75 files changed

+2249
-1396
lines changed

Some content is hidden

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

75 files changed

+2249
-1396
lines changed

.github/scripts/setup-slapd.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ olcTLSCertificateKeyFile: /etc/ldap/ssl/server.key
7272
add: olcTLSVerifyClient
7373
olcTLSVerifyClient: never
7474
-
75+
add: olcTLSProtocolMin
76+
olcTLSProtocolMin: 3.3
77+
-
7578
add: olcAuthzRegexp
7679
olcAuthzRegexp: uid=usera,cn=digest-md5,cn=auth cn=usera,dc=my-domain,dc=com
7780
-

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,3 @@ tmp-php.ini
316316
!/ext/lexbor/patches/*.patch
317317
!/ext/pcre/pcre2lib/config.h
318318
!/win32/build/Makefile
319-
320-
# ------------------------------------------------------------------------------
321-
# True Asynchronous extensions
322-
# ------------------------------------------------------------------------------
323-
/ext/async
324-
/ext/http_server

NEWS

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

5+
- Core:
6+
. Add clone-with support to the clone() function. (timwolla, edorian)
7+
8+
- Curl:
9+
. Add support for CURLINFO_CONN_ID in curl_getinfo() (thecaliskan)
10+
. Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (thecaliskan)
11+
512
- Sockets:
613
. socket_set_option for multicast context throws a ValueError
714
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)
815

16+
- URI:
17+
. Empty host handling is fixed. (Máté Kocsis)
18+
. Error handling of Uri\WhatWg\Url::withHost() is fixed when the input
19+
contains a port. Now, it triggers an exception; previously, the error
20+
was silently swallowed. (Máté Kocsis)
21+
922
17 Jul 2025, PHP 8.5.0alpha2
1023

1124
- Core:

UPGRADING

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ PHP 8.5 UPGRADE NOTES
188188
first redirect thus if there is any follow up redirect, it won't go
189189
any further. CURLFOLLOW_ALL is equivalent to setting CURLOPT_FOLLOWLOCATION
190190
to true.
191+
. Added support for CURLINFO_CONN_ID (libcurl >= 8.2.0) to the curl_getinfo()
192+
function. This constant allows retrieving the unique ID of the connection
193+
used by a cURL transfer. It is primarily useful when connection reuse or
194+
connection pooling logic is needed in PHP-level applications. When
195+
curl_getinfo() returns an array, this value is available as the "conn_id" key.
196+
. Added support for CURLINFO_QUEUE_TIME_T (libcurl >= 8.6.0) to the curl_getinfo()
197+
function. This constant allows retrieving the time (in microseconds) that the
198+
request spent in libcurl’s connection queue before it was sent.
199+
This value can also be retrieved by passing CURLINFO_QUEUE_TIME_T to the
200+
curl_getinfo() $option parameter.
191201

192202
- DOM:
193203
. Added Dom\Element::$outerHTML.
@@ -398,7 +408,8 @@ PHP 8.5 UPGRADE NOTES
398408
. get_exception_handler() allows retrieving the current user-defined exception
399409
handler function.
400410
RFC: https://wiki.php.net/rfc/get-error-exception-handler
401-
. The clone language construct is now a function.
411+
. The clone language construct is now a function and supports reassigning
412+
(readonly) properties during cloning via the new $withProperties parameter.
402413
RFC: https://wiki.php.net/rfc/clone_with_v2
403414

404415
- Curl:
@@ -425,6 +436,9 @@ PHP 8.5 UPGRADE NOTES
425436
. Added grapheme_levenshtein() function.
426437
RFC: https://wiki.php.net/rfc/grapheme_levenshtein
427438

439+
- Opcache:
440+
. Added opcache_is_script_cached_in_file_cache().
441+
428442
- Pdo\Sqlite:
429443
. Added support for Pdo\Sqlite::setAuthorizer(), which is the equivalent of
430444
SQLite3::setAuthorizer(). The only interface difference is that the
@@ -460,6 +474,13 @@ PHP 8.5 UPGRADE NOTES
460474
across multiple PHP requests.
461475
RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
462476

477+
- URI:
478+
. Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode,
479+
Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException,
480+
Uri\WhatWg\UrlValidationErrorType, Uri\WhatWg\UrlValidationError,
481+
and Uri\WhatWg\Url are added.
482+
RFC: https://wiki.php.net/rfc/url_parsing_api
483+
463484
========================================
464485
8. Removed Extensions and SAPIs
465486
========================================
@@ -483,6 +504,11 @@ PHP 8.5 UPGRADE NOTES
483504
library that was separated from ext/dom for being reused among other
484505
extensions. The new extension is not directly exposed to userland.
485506

507+
- URI:
508+
. An always enabled uri extension is added that can be used for handling
509+
URIs and URLs according to RFC 3986 and WHATWG URL.
510+
RFC: https://wiki.php.net/rfc/url_parsing_api
511+
486512
- PCRE:
487513
. Upgraded to pcre2lib from 10.44 to 10.45.
488514

@@ -505,6 +531,8 @@ PHP 8.5 UPGRADE NOTES
505531
. CURLINFO_USED_PROXY.
506532
. CURLINFO_HTTPAUTH_USED.
507533
. CURLINFO_PROXYAUTH_USED.
534+
. CURLINFO_CONN_ID.
535+
. CURLINFO_QUEUE_TIME_T.
508536
. CURLOPT_INFILESIZE_LARGE.
509537
. CURLFOLLOW_ALL.
510538
. CURLFOLLOW_OBEYCODE.

Zend/tests/clone/clone_with_001.phpt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
--TEST--
2+
Clone with basic
3+
--FILE--
4+
<?php
5+
6+
class Dummy { }
7+
8+
$x = new stdClass();
9+
10+
$foo = 'FOO';
11+
$bar = new Dummy();
12+
$array = [
13+
'baz' => 'BAZ',
14+
'array' => [1, 2, 3],
15+
];
16+
17+
var_dump(clone $x);
18+
var_dump(clone($x));
19+
var_dump(clone($x, [ 'foo' => $foo, 'bar' => $bar ]));
20+
var_dump(clone($x, $array));
21+
var_dump(clone($x, [ 'obj' => $x ]));
22+
23+
var_dump(clone($x, [
24+
'abc',
25+
'def',
26+
new Dummy(),
27+
'named' => 'value',
28+
]));
29+
30+
?>
31+
--EXPECTF--
32+
object(stdClass)#%d (0) {
33+
}
34+
object(stdClass)#%d (0) {
35+
}
36+
object(stdClass)#%d (2) {
37+
["foo"]=>
38+
string(3) "FOO"
39+
["bar"]=>
40+
object(Dummy)#%d (0) {
41+
}
42+
}
43+
object(stdClass)#%d (2) {
44+
["baz"]=>
45+
string(3) "BAZ"
46+
["array"]=>
47+
array(3) {
48+
[0]=>
49+
int(1)
50+
[1]=>
51+
int(2)
52+
[2]=>
53+
int(3)
54+
}
55+
}
56+
object(stdClass)#%d (1) {
57+
["obj"]=>
58+
object(stdClass)#%d (0) {
59+
}
60+
}
61+
object(stdClass)#%d (4) {
62+
["0"]=>
63+
string(3) "abc"
64+
["1"]=>
65+
string(3) "def"
66+
["2"]=>
67+
object(Dummy)#%d (0) {
68+
}
69+
["named"]=>
70+
string(5) "value"
71+
}

Zend/tests/clone/clone_with_002.phpt

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
--TEST--
2+
Clone with respects visiblity
3+
--FILE--
4+
<?php
5+
6+
class P {
7+
public $a = 'default';
8+
protected $b = 'default';
9+
private $c = 'default';
10+
public private(set) string $d = 'default';
11+
12+
public function m1() {
13+
return clone($this, [ 'a' => 'updated A', 'b' => 'updated B', 'c' => 'updated C', 'd' => 'updated D' ]);
14+
}
15+
}
16+
17+
class C extends P {
18+
public function m2() {
19+
return clone($this, [ 'a' => 'updated A', 'b' => 'updated B', 'c' => 'dynamic C' ]);
20+
}
21+
22+
public function m3() {
23+
return clone($this, [ 'd' => 'inaccessible' ]);
24+
}
25+
}
26+
27+
class Unrelated {
28+
public function m3(P $p) {
29+
return clone($p, [ 'b' => 'inaccessible' ]);
30+
}
31+
}
32+
33+
$p = new P();
34+
35+
var_dump(clone($p, [ 'a' => 'updated A' ]));
36+
var_dump($p->m1());
37+
38+
$c = new C();
39+
var_dump($c->m1());
40+
var_dump($c->m2());
41+
try {
42+
var_dump($c->m3());
43+
} catch (Error $e) {
44+
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
45+
}
46+
47+
try {
48+
var_dump(clone($p, [ 'b' => 'inaccessible' ]));
49+
} catch (Error $e) {
50+
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
51+
}
52+
53+
try {
54+
var_dump(clone($p, [ 'd' => 'inaccessible' ]));
55+
} catch (Error $e) {
56+
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
57+
}
58+
59+
try {
60+
var_dump((new Unrelated())->m3($p));
61+
} catch (Error $e) {
62+
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
63+
}
64+
65+
?>
66+
--EXPECTF--
67+
object(P)#%d (4) {
68+
["a"]=>
69+
string(9) "updated A"
70+
["b":protected]=>
71+
string(7) "default"
72+
["c":"P":private]=>
73+
string(7) "default"
74+
["d"]=>
75+
string(7) "default"
76+
}
77+
object(P)#%d (4) {
78+
["a"]=>
79+
string(9) "updated A"
80+
["b":protected]=>
81+
string(9) "updated B"
82+
["c":"P":private]=>
83+
string(9) "updated C"
84+
["d"]=>
85+
string(9) "updated D"
86+
}
87+
object(C)#%d (4) {
88+
["a"]=>
89+
string(9) "updated A"
90+
["b":protected]=>
91+
string(9) "updated B"
92+
["c":"P":private]=>
93+
string(9) "updated C"
94+
["d"]=>
95+
string(9) "updated D"
96+
}
97+
98+
Deprecated: Creation of dynamic property C::$c is deprecated in %s on line %d
99+
object(C)#%d (5) {
100+
["a"]=>
101+
string(9) "updated A"
102+
["b":protected]=>
103+
string(9) "updated B"
104+
["c":"P":private]=>
105+
string(7) "default"
106+
["d"]=>
107+
string(7) "default"
108+
["c"]=>
109+
string(9) "dynamic C"
110+
}
111+
Error: Cannot modify private(set) property P::$d from scope C
112+
Error: Cannot access protected property P::$b
113+
Error: Cannot modify private(set) property P::$d from global scope
114+
Error: Cannot access protected property P::$b

Zend/tests/clone/clone_with_003.phpt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
Clone with supports property hooks
3+
--FILE--
4+
<?php
5+
6+
class Clazz {
7+
public string $hooked = 'default' {
8+
set {
9+
$this->hooked = strtoupper($value);
10+
}
11+
}
12+
}
13+
14+
$c = new Clazz();
15+
16+
var_dump(clone($c, [ 'hooked' => 'updated' ]));
17+
18+
?>
19+
--EXPECTF--
20+
object(Clazz)#%d (1) {
21+
["hooked"]=>
22+
string(7) "UPDATED"
23+
}

0 commit comments

Comments
 (0)