Skip to content

Commit 30ea6e1

Browse files
thecaliskanEmre Çalışkan
and
Emre Çalışkan
authored
Added PHP 8.4 Support for Elasticsearch 7.17 || 7.x Compatibility (#1417)
* added php84 * added php84 * added php84 support * added php84 support * added php84 support --------- Co-authored-by: Emre Çalışkan <[email protected]>
1 parent 2d22132 commit 30ea6e1

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.ci/test-matrix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ STACK_VERSION:
33
- 7.17-SNAPSHOT
44

55
PHP_VERSION:
6+
- 8.4-cli
67
- 8.3-cli
78
- 8.2-cli
89
- 8.1-cli

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

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

src/Elasticsearch/ClientBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public function setSniffOnStart(bool $sniffOnStart): ClientBuilder
527527
* @param string $cert The name of a file containing a PEM formatted certificate.
528528
* @param string $password if the certificate requires a password
529529
*/
530-
public function setSSLCert(string $cert, string $password = null): ClientBuilder
530+
public function setSSLCert(string $cert, ?string $password = null): ClientBuilder
531531
{
532532
$this->sslCert = [$cert, $password];
533533

@@ -540,7 +540,7 @@ public function setSSLCert(string $cert, string $password = null): ClientBuilder
540540
* @param string $key The name of a file containing a private SSL key
541541
* @param string $password if the private key requires a password
542542
*/
543-
public function setSSLKey(string $key, string $password = null): ClientBuilder
543+
public function setSSLKey(string $key, ?string $password = null): ClientBuilder
544544
{
545545
$this->sslKey = [$key, $password];
546546

src/Elasticsearch/Connections/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function __construct(
201201
* @param Transport $transport
202202
* @return mixed
203203
*/
204-
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null)
204+
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], ?Transport $transport = null)
205205
{
206206
if ($body !== null) {
207207
$body = $this->serializer->serialize($body);
@@ -255,7 +255,7 @@ public function getLastRequestInfo(): array
255255

256256
private function wrapHandler(callable $handler): callable
257257
{
258-
return function (array $request, Connection $connection, Transport $transport = null, $options) use ($handler) {
258+
return function (array $request, Connection $connection, ?Transport $transport = null, array $options = []) use ($handler) {
259259

260260
$this->lastRequest = [];
261261
$this->lastRequest['request'] = $request;

src/Elasticsearch/Connections/ConnectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ public function getLastRequestInfo(): array;
7575
* @param null $body
7676
* @return mixed
7777
*/
78-
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null);
78+
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], ?Transport $transport = null);
7979
}

0 commit comments

Comments
 (0)