Skip to content

PHP 8.4 compatibility #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
php-version: [7.4, 8.0, 8.1, 8.2, 8.3]
php-version: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
os: [ubuntu-latest]
es-version: [8.14-SNAPSHOT]

Expand Down
8 changes: 4 additions & 4 deletions src/ClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function setHosts(array $hosts): ClientBuilder
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
*/
public function setApiKey(string $apiKey, string $id = null): ClientBuilder
public function setApiKey(string $apiKey, ?string $id = null): ClientBuilder
{
if (empty($id)) {
$this->apiKey = $apiKey;
Expand Down Expand Up @@ -272,7 +272,7 @@ public function setRetries(int $retries): ClientBuilder
* @param string $cert The name of a file containing a PEM formatted certificate
* @param string $password if the certificate requires a password
*/
public function setSSLCert(string $cert, string $password = null): ClientBuilder
public function setSSLCert(string $cert, ?string $password = null): ClientBuilder
{
$this->sslCert = [$cert, $password];
return $this;
Expand All @@ -295,7 +295,7 @@ public function setCABundle(string $cert): ClientBuilder
* @param string $key The name of a file containing a private SSL key
* @param string $password if the private key requires a password
*/
public function setSSLKey(string $key, string $password = null): ClientBuilder
public function setSSLKey(string $key, ?string $password = null): ClientBuilder
{
$this->sslKey = [$key, $password];
return $this;
Expand Down Expand Up @@ -469,4 +469,4 @@ protected function setOptions(ClientInterface $client, array $config, array $cli
$adapter = new $adapterClass;
return $adapter->setConfig($client, $config, $clientOptions);
}
}
}
Loading