Skip to content

Commit 3afe58b

Browse files
authored
Merge branch 'master' into php-build-provider-constant
2 parents f9a042e + a8a3c81 commit 3afe58b

File tree

8 files changed

+73
-1
lines changed

8 files changed

+73
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PHP NEWS
55
- Core:
66
. Added PHP_BUILD_PROVIDER constant. (timwolla)
77

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+
812
- Sockets:
913
. socket_set_option for multicast context throws a ValueError
1014
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)

UPGRADING

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ PHP 8.5 UPGRADE NOTES
193193
used by a cURL transfer. It is primarily useful when connection reuse or
194194
connection pooling logic is needed in PHP-level applications. When
195195
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.
196201

197202
- DOM:
198203
. Added Dom\Element::$outerHTML.
@@ -527,6 +532,7 @@ PHP 8.5 UPGRADE NOTES
527532
. CURLINFO_HTTPAUTH_USED.
528533
. CURLINFO_PROXYAUTH_USED.
529534
. CURLINFO_CONN_ID.
535+
. CURLINFO_QUEUE_TIME_T.
530536
. CURLOPT_INFILESIZE_LARGE.
531537
. CURLFOLLOW_ALL.
532538
. CURLFOLLOW_OBEYCODE.

Zend/zend_compile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,6 +7921,8 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
79217921
continue;
79227922
}
79237923

7924+
CG(zend_lineno) = param_ast->lineno;
7925+
79247926
/* Emit $this->prop = $prop for promoted properties. */
79257927
zend_string *name = zend_ast_get_str(param_ast->child[1]);
79267928
znode name_node, value_node;

ext/curl/curl.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,13 @@
30543054
* @cvalue CURLAUTH_BEARER
30553055
*/
30563056
const CURLAUTH_BEARER = UNKNOWN;
3057+
#if LIBCURL_VERSION_NUM >= 0x080600 /* Available since 8.6.0 */
3058+
/**
3059+
* @var int
3060+
* @cvalue CURLINFO_QUEUE_TIME_T
3061+
*/
3062+
const CURLINFO_QUEUE_TIME_T = UNKNOWN;
3063+
#endif
30573064
/**
30583065
* @var int
30593066
* @cvalue CURLINFO_APPCONNECT_TIME_T

ext/curl/curl_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/interface.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,6 +2571,11 @@ PHP_FUNCTION(curl_getinfo)
25712571
if (curl_easy_getinfo(ch->cp, CURLINFO_APPCONNECT_TIME_T, &co) == CURLE_OK) {
25722572
CAAL("appconnect_time_us", co);
25732573
}
2574+
#if LIBCURL_VERSION_NUM >= 0x080600 /* Available since 8.6.0 */
2575+
if (curl_easy_getinfo(ch->cp, CURLINFO_QUEUE_TIME_T , &co) == CURLE_OK) {
2576+
CAAL("queue_time_us", co);
2577+
}
2578+
#endif
25742579
if (curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME_T, &co) == CURLE_OK) {
25752580
CAAL("connect_time_us", co);
25762581
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--TEST--
2+
Curlinfo CURLINFO_QUEUE_TIME_T
3+
--EXTENSIONS--
4+
curl
5+
--SKIPIF--
6+
<?php
7+
$curl_version = curl_version();
8+
if ($curl_version['version_number'] < 0x080600) die("skip: test works only with curl >= 8.6.0");
9+
?>
10+
--FILE--
11+
<?php
12+
include 'server.inc';
13+
14+
$host = curl_cli_server_start();
15+
$port = (int) (explode(':', $host))[1];
16+
17+
$ch = curl_init();
18+
curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file");
19+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
20+
21+
$info = curl_getinfo($ch);
22+
var_dump(isset($info['queue_time_us']));
23+
var_dump($info['queue_time_us'] === 0); // this is always 0 before executing the transfer
24+
25+
$result = curl_exec($ch);
26+
27+
$info = curl_getinfo($ch);
28+
var_dump(isset($info['queue_time_us']));
29+
var_dump(is_int($info['queue_time_us']));
30+
var_dump(curl_getinfo($ch, CURLINFO_QUEUE_TIME_T) === $info['queue_time_us']);
31+
var_dump(curl_getinfo($ch, CURLINFO_QUEUE_TIME_T) > 0);
32+
33+
?>
34+
--EXPECT--
35+
bool(true)
36+
bool(true)
37+
bool(true)
38+
bool(true)
39+
bool(true)
40+
bool(true)
41+

ext/ldap/tests/ldap_start_tls_rc_max_version.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ldap
66
LDAPCONF={PWD}/ldap_start_tls_rc_max_version.conf
77
--SKIPIF--
88
<?php
9+
// Skip in CI for now as adding olcTLSProtocolMin does not seem to work (needs investigation)
10+
if (getenv('CI')) {
11+
die("Skip in CI for now");
12+
}
913
$require_vendor = [
1014
"name" => "OpenLDAP",
1115
"min_version" => 20600,

0 commit comments

Comments
 (0)