Skip to content

Commit 5ba299b

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 684ef01 + 35c03c1 commit 5ba299b

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/scripts/windows/test_task.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ rem generate php.ini
123123
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
124124
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
125125
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
126-
rem work-around for some spawned PHP processes requiring OpenSSL
126+
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
127127
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
128+
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini
128129

129130
rem remove ext dlls for which tests are not supported
130131
for %%i in (ldap) do (

ext/standard/tests/http/gh16810.phpt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
--TEST--
2-
Bug #79265 variation: "host:" not at start of header
2+
GH-16809 (fopen HTTP wrapper timeout stream context option overflow)
33
--INI--
44
allow_url_fopen=1
55
--SKIPIF--
66
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
77
--FILE--
88
<?php
9-
$uri = "http://www.example.com";
9+
$serverCode = <<<'CODE'
10+
echo 1;
11+
CODE;
12+
13+
include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc";
14+
php_cli_server_start($serverCode, null, []);
15+
16+
$uri = "http://" . PHP_CLI_SERVER_ADDRESS . '/test';
1017
$config = [
11-
'http' => [
12-
'timeout' => PHP_INT_MIN,
13-
],
18+
'http' => [
19+
'timeout' => PHP_INT_MIN,
20+
],
1421
];
1522
$ctx = stream_context_create($config);
1623
var_dump(fopen($uri, "r", false, $ctx));
@@ -22,5 +29,5 @@ var_dump(fopen($uri, "r", false, $ctx));
2229
--EXPECTF--
2330
resource(%d) of type (stream)
2431

25-
Warning: fopen(http://www.example.com): Failed to open stream: timeout must be lower than %d in %s on line %d
32+
Warning: fopen(http://%s): Failed to open stream: timeout must be lower than %d in %s on line %d
2633
bool(false)

ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ sockets
55
--SKIPIF--
66
<?php
77
if (!function_exists("proc_open")) die("skip no proc_open");
8-
if (substr(PHP_OS, 0, 3) == 'WIN') {
9-
die('skip sockets ext currently does not work in worker on Windows');
10-
}
118
?>
129
--FILE--
1310
<?php
@@ -32,12 +29,12 @@ CODE;
3229

3330
$clientCode = <<<'CODE'
3431
$test = stream_socket_client("tcp://{{ ADDR }}", $errno, $errstr, 10);
35-
3632
echo phpt_wait();
3733
CODE;
3834

3935
include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__);
4036
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
4137
?>
42-
--EXPECT--
38+
--EXPECTF--
4339
server-delay:conn-nodelay
40+

0 commit comments

Comments
 (0)