Skip to content

Commit e9ca41c

Browse files
committed
chore: migrations for php8.5
* remove deprecated `curl_close` * remove deprecated param `key_length` for `openssl_pkey_derive`
1 parent 331a05c commit e9ca41c

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/Encryption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ private static function calculateAgreementKey(JWK $private_key, JWK $public_key)
296296
$publicPem = ECKey::convertPublicKeyToPEM($public_key);
297297
$privatePem = ECKey::convertPrivateKeyToPEM($private_key);
298298

299-
$result = openssl_pkey_derive($publicPem, $privatePem, 256);
299+
$result = openssl_pkey_derive($publicPem, $privatePem);
300300
if ($result === false) {
301301
throw new \RuntimeException('Unable to compute the agreement key.');
302302
}

tests/PushServiceTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ private function getResponse($ch)
166166

167167
if (!$resp) {
168168
$error = 'Curl error: n'.curl_errno($ch).' - '.curl_error($ch);
169-
curl_close($ch);
170169
throw new RuntimeException($error);
171170
}
172171

@@ -176,9 +175,6 @@ private function getResponse($ch)
176175
throw new RuntimeException('web-push-testing-service error: '.$resp);
177176
}
178177

179-
// Close request to clear up some resources
180-
curl_close($ch);
181-
182178
return $parsedResp;
183179
}
184180
}

tests/WebPushTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ private static function setCiEnvironment(): void
107107

108108
if (!$response) {
109109
$error = 'Curl error: n'.curl_errno($getSubscriptionCurl).' - '.curl_error($getSubscriptionCurl);
110-
curl_close($getSubscriptionCurl);
111110
throw new RuntimeException($error);
112111
}
113112

0 commit comments

Comments
 (0)