diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 822de1841..e1cb77e61 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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] diff --git a/src/ClientBuilder.php b/src/ClientBuilder.php index 0d05e1bdf..cf4f2ca94 100644 --- a/src/ClientBuilder.php +++ b/src/ClientBuilder.php @@ -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; @@ -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; @@ -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; @@ -469,4 +469,4 @@ protected function setOptions(ClientInterface $client, array $config, array $cli $adapter = new $adapterClass; return $adapter->setConfig($client, $config, $clientOptions); } -} \ No newline at end of file +}