From 73b4ac4faac207a3a424e0048fd3613a5be831ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Mon, 20 Jul 2026 03:52:01 +0200 Subject: [PATCH] Fix the upstream descriptors source URL Microsoft moved deviceDescriptorsSource.json from packages/playwright-core/src/server/ to packages/isomorphic/, so the updater failed with HTTP 404. Also drop the curl_close() call, deprecated since PHP 8.5 and a no-op since 8.0. --- bin/update-devices.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/update-devices.php b/bin/update-devices.php index 1978cdc..b63036f 100644 --- a/bin/update-devices.php +++ b/bin/update-devices.php @@ -12,7 +12,7 @@ * file that was distributed with this source code. */ -const SOURCE_URL = 'https://raw.githubusercontent.com/microsoft/playwright/main/packages/playwright-core/src/server/deviceDescriptorsSource.json'; +const SOURCE_URL = 'https://raw.githubusercontent.com/microsoft/playwright/main/packages/isomorphic/deviceDescriptorsSource.json'; $rootDir = dirname(__DIR__); $jsonPath = $rootDir.'/data/deviceDescriptorsSource.json'; @@ -50,7 +50,6 @@ function downloadDescriptors(string $url): string $response = curl_exec($handle); $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); $error = curl_error($handle); - curl_close($handle); if (false === $response || $httpCode >= 400) { throw new RuntimeException(sprintf('cURL download failed (HTTP %s): %s', $httpCode ?: 'n/a', $error ?: 'unknown error'));