Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.5.0alpha3

- Curl:
. Add support for CURLINFO_CONN_ID in curl_getinfo() (thecaliskan)
. Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (thecaliskan)

- Sockets:
. socket_set_option for multicast context throws a ValueError
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)
Expand Down
6 changes: 6 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ PHP 8.5 UPGRADE NOTES
used by a cURL transfer. It is primarily useful when connection reuse or
connection pooling logic is needed in PHP-level applications. When
curl_getinfo() returns an array, this value is available as the "conn_id" key.
. Added support for CURLINFO_QUEUE_TIME_T (libcurl >= 8.6.0) to the curl_getinfo()
function. This constant allows retrieving the time (in microseconds) that the
request spent in libcurl’s connection queue before it was sent.
This value can also be retrieved by passing CURLINFO_QUEUE_TIME_T to the
curl_getinfo() $option parameter.

- DOM:
. Added Dom\Element::$outerHTML.
Expand Down Expand Up @@ -526,6 +531,7 @@ PHP 8.5 UPGRADE NOTES
. CURLINFO_HTTPAUTH_USED.
. CURLINFO_PROXYAUTH_USED.
. CURLINFO_CONN_ID.
. CURLINFO_QUEUE_TIME_T.
. CURLOPT_INFILESIZE_LARGE.
. CURLFOLLOW_ALL.
. CURLFOLLOW_OBEYCODE.
Expand Down
2 changes: 2 additions & 0 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -7921,6 +7921,8 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
continue;
}

CG(zend_lineno) = param_ast->lineno;

/* Emit $this->prop = $prop for promoted properties. */
zend_string *name = zend_ast_get_str(param_ast->child[1]);
znode name_node, value_node;
Expand Down
7 changes: 7 additions & 0 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,13 @@
* @cvalue CURLAUTH_BEARER
*/
const CURLAUTH_BEARER = UNKNOWN;
#if LIBCURL_VERSION_NUM >= 0x080600 /* Available since 8.6.0 */
/**
* @var int
* @cvalue CURLINFO_QUEUE_TIME_T
*/
const CURLINFO_QUEUE_TIME_T = UNKNOWN;
#endif
/**
* @var int
* @cvalue CURLINFO_APPCONNECT_TIME_T
Expand Down
5 changes: 4 additions & 1 deletion ext/curl/curl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,11 @@ PHP_FUNCTION(curl_getinfo)
if (curl_easy_getinfo(ch->cp, CURLINFO_APPCONNECT_TIME_T, &co) == CURLE_OK) {
CAAL("appconnect_time_us", co);
}
#if LIBCURL_VERSION_NUM >= 0x080600 /* Available since 8.6.0 */
if (curl_easy_getinfo(ch->cp, CURLINFO_QUEUE_TIME_T , &co) == CURLE_OK) {
CAAL("queue_time_us", co);
}
#endif
if (curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME_T, &co) == CURLE_OK) {
CAAL("connect_time_us", co);
}
Expand Down
41 changes: 41 additions & 0 deletions ext/curl/tests/curl_getinfo_CURLINFO_QUEUE_TIME_T.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--TEST--
Curlinfo CURLINFO_QUEUE_TIME_T
--EXTENSIONS--
curl
--SKIPIF--
<?php
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x080600) die("skip: test works only with curl >= 8.6.0");
?>
--FILE--
<?php
include 'server.inc';

$host = curl_cli_server_start();
$port = (int) (explode(':', $host))[1];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$info = curl_getinfo($ch);
var_dump(isset($info['queue_time_us']));
var_dump($info['queue_time_us'] === 0); // this is always 0 before executing the transfer

$result = curl_exec($ch);

$info = curl_getinfo($ch);
var_dump(isset($info['queue_time_us']));
var_dump(is_int($info['queue_time_us']));
var_dump(curl_getinfo($ch, CURLINFO_QUEUE_TIME_T) === $info['queue_time_us']);
var_dump(curl_getinfo($ch, CURLINFO_QUEUE_TIME_T) > 0);

?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

4 changes: 4 additions & 0 deletions ext/ldap/tests/ldap_start_tls_rc_max_version.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ ldap
LDAPCONF={PWD}/ldap_start_tls_rc_max_version.conf
--SKIPIF--
<?php
// Skip in CI for now as adding olcTLSProtocolMin does not seem to work (needs investigation)
if (getenv('CI')) {
die("Skip in CI for now");
}
$require_vendor = [
"name" => "OpenLDAP",
"min_version" => 20600,
Expand Down