Skip to content

Commit 40f32f4

Browse files
Merge branch '5.3' into 5.4
* 5.3: fix tests (quinter) fix tests (quater) bump ext-mongodb
2 parents 8802a31 + 8a1bb44 commit 40f32f4

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Tests/CurlHttpClientTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ protected function getHttpClient(string $testCase): HttpClientInterface
3838
public function testBindToPort()
3939
{
4040
$client = $this->getHttpClient(__FUNCTION__);
41-
$localhost = gethostbyname('localhost');
42-
$response = $client->request('GET', "http://$localhost:8057", ['bindto' => "$localhost:9876"]);
41+
$response = $client->request('GET', 'http://localhost:8057', ['bindto' => '127.0.0.1:9876']);
4342
$response->getStatusCode();
4443

4544
$r = new \ReflectionProperty($response, 'handle');
4645
$r->setAccessible(true);
4746

4847
$curlInfo = curl_getinfo($r->getValue($response));
4948

50-
self::assertSame($localhost, $curlInfo['local_ip']);
49+
self::assertSame('127.0.0.1', $curlInfo['local_ip']);
5150
self::assertSame(9876, $curlInfo['local_port']);
5251
}
5352

Tests/HttpClientTestCase.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,13 @@ private static function startVulcain(HttpClientInterface $client)
298298
self::markTestSkipped('Testing with the "vulcain" is not supported on Windows.');
299299
}
300300

301-
$localhost = gethostbyname('localhost');
302-
303-
if (['application/json'] !== $client->request('GET', "http://$localhost:8057/json")->getHeaders()['content-type']) {
301+
if (['application/json'] !== $client->request('GET', 'http://127.0.0.1:8057/json')->getHeaders()['content-type']) {
304302
self::markTestSkipped('symfony/http-client-contracts >= 2.0.1 required');
305303
}
306304

307305
$process = new Process(['vulcain'], null, [
308306
'DEBUG' => 1,
309-
'UPSTREAM' => "http://$localhost:8057",
307+
'UPSTREAM' => 'http://127.0.0.1:8057',
310308
'ADDR' => ':3000',
311309
'KEY_FILE' => __DIR__.'/Fixtures/tls/server.key',
312310
'CERT_FILE' => __DIR__.'/Fixtures/tls/server.crt',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"php": ">=7.2.5",
2525
"psr/log": "^1.0",
2626
"symfony/deprecation-contracts": "^2.1",
27-
"symfony/http-client-contracts": "^2.4.1",
27+
"symfony/http-client-contracts": "^2.4",
2828
"symfony/polyfill-php73": "^1.11",
2929
"symfony/polyfill-php80": "^1.15",
3030
"symfony/service-contracts": "^1.0|^2"

0 commit comments

Comments
 (0)