From 411d400a67f35a29c736da63ee8c25fe09a42108 Mon Sep 17 00:00:00 2001 From: Rodrigo Moglia Date: Tue, 18 Aug 2026 14:19:15 -0300 Subject: [PATCH] fix: remove deprecated curl_close() calls curl_close() is a no-op since PHP 8.0 and deprecated as of PHP 8.5. The package targets ^8.2, so the calls can be removed outright. --- src/GoogleProvider.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/GoogleProvider.php b/src/GoogleProvider.php index c8dd329..e1bf17b 100644 --- a/src/GoogleProvider.php +++ b/src/GoogleProvider.php @@ -730,8 +730,6 @@ protected function getRequest(string $url): array $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); - curl_close($ch); - if ($error !== '') { throw new RuntimeException("Google API request failed: {$error}"); } @@ -770,8 +768,6 @@ protected function downloadVideo(string $uri): string|false $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); - curl_close($ch); - if ($error !== '' || $httpCode >= 400 || !is_string($data)) { return false; } @@ -1419,8 +1415,6 @@ protected function request(string $url, array $payload): array $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); - curl_close($ch); - if ($error !== '') { throw new RuntimeException("Google API request failed: {$error}"); } @@ -1468,8 +1462,6 @@ protected function embeddingRequest(array $payload, string $url): array $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); - curl_close($ch); - if ($error !== '') { throw new RuntimeException("Google API request failed: {$error}"); } @@ -1556,7 +1548,6 @@ protected function streamRequest(string $url, array $payload): Generator ]); curl_exec($ch); - curl_close($ch); // Parse SSE events $lines = explode("\n", $buffer);