Skip to content

Commit

Permalink
switched to curl/libcurl 8.8, dns resolving for hostnames is broken i…
Browse files Browse the repository at this point in the history
…n 8.5
  • Loading branch information
Thomas Bley committed Jun 29, 2024
1 parent b6492f6 commit e9471fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/php82/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19
FROM alpine:edge

# use 1 run command to reduce container image layers
RUN apk --no-cache upgrade \
Expand Down
2 changes: 1 addition & 1 deletion tasks_be/tests/feature/Tasks/TasksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private function curl(string $method, string $url, string $schemaUrl, array $par
$curlHandle = curl_init();
curl_setopt_array($curlHandle, [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_URL => sprintf('http://%s:8080' . $url, gethostbyname('nginx')),
CURLOPT_URL => 'http://nginx:8080' . $url,
CURLOPT_POSTFIELDS => json_encode($params, JSON_FORCE_OBJECT),
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Authorization: ' . $this->authorization],
CURLOPT_RETURNTRANSFER => 1,
Expand Down
4 changes: 2 additions & 2 deletions tasks_be/tests/integration/Infrastructure/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testEmailDelivery(): void

$curlHandle = curl_init();
curl_setopt_array($curlHandle, [
CURLOPT_URL => sprintf('http://%s:8025/api/v1/messages?limit=1', gethostbyname('mailpit')),
CURLOPT_URL => 'http://mailpit:8025/api/v1/messages?limit=1',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => 10,
]);
Expand All @@ -37,7 +37,7 @@ public function testEmailDelivery(): void

$curlHandle = curl_init();
curl_setopt_array($curlHandle, [
CURLOPT_URL => sprintf('http://%s:8025/api/v1/message/%s', gethostbyname('mailpit'), urlencode($id)),
CURLOPT_URL => 'http://mailpit:8025/api/v1/message/' . urlencode($id),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => 10,
]);
Expand Down

0 comments on commit e9471fc

Please sign in to comment.