Skip to content

Commit 7440931

Browse files
authored
PHP 8.4 compatibility (#1415)
* Add PHP 8.4 to matrix * Make compatible with PHP 8.4 Fixes #1413
1 parent 34c2444 commit 7440931

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php-version: [7.4, 8.0, 8.1, 8.2, 8.3]
12+
php-version: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
1313
os: [ubuntu-latest]
1414
es-version: [8.14-SNAPSHOT]
1515

src/ClientBuilder.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function setHosts(array $hosts): ClientBuilder
226226
*
227227
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
228228
*/
229-
public function setApiKey(string $apiKey, string $id = null): ClientBuilder
229+
public function setApiKey(string $apiKey, ?string $id = null): ClientBuilder
230230
{
231231
if (empty($id)) {
232232
$this->apiKey = $apiKey;
@@ -272,7 +272,7 @@ public function setRetries(int $retries): ClientBuilder
272272
* @param string $cert The name of a file containing a PEM formatted certificate
273273
* @param string $password if the certificate requires a password
274274
*/
275-
public function setSSLCert(string $cert, string $password = null): ClientBuilder
275+
public function setSSLCert(string $cert, ?string $password = null): ClientBuilder
276276
{
277277
$this->sslCert = [$cert, $password];
278278
return $this;
@@ -295,7 +295,7 @@ public function setCABundle(string $cert): ClientBuilder
295295
* @param string $key The name of a file containing a private SSL key
296296
* @param string $password if the private key requires a password
297297
*/
298-
public function setSSLKey(string $key, string $password = null): ClientBuilder
298+
public function setSSLKey(string $key, ?string $password = null): ClientBuilder
299299
{
300300
$this->sslKey = [$key, $password];
301301
return $this;
@@ -469,4 +469,4 @@ protected function setOptions(ClientInterface $client, array $config, array $cli
469469
$adapter = new $adapterClass;
470470
return $adapter->setConfig($client, $config, $clientOptions);
471471
}
472-
}
472+
}

0 commit comments

Comments
 (0)