Skip to content
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

Added PHP 8.4 Support for Elasticsearch 7.17 || 7.x Compatibility #1417

Open
wants to merge 5 commits into
base: 7.17
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ STACK_VERSION:
- 7.17-SNAPSHOT

PHP_VERSION:
- 8.4-cli
- 8.3-cli
- 8.2-cli
- 8.1-cli
Expand Down
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.3, 7.4, 8.0, 8.1, 8.2, 8.3]
php-version: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
os: [ubuntu-latest]
es-version: [7.17-SNAPSHOT]

Expand Down
4 changes: 2 additions & 2 deletions src/Elasticsearch/ClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public function setSniffOnStart(bool $sniffOnStart): 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];

Expand All @@ -540,7 +540,7 @@ public function setSSLCert(string $cert, string $password = null): 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];

Expand Down
4 changes: 2 additions & 2 deletions src/Elasticsearch/Connections/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function __construct(
* @param Transport $transport
* @return mixed
*/
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null)
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], ?Transport $transport = null)
{
if ($body !== null) {
$body = $this->serializer->serialize($body);
Expand Down Expand Up @@ -255,7 +255,7 @@ public function getLastRequestInfo(): array

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

$this->lastRequest = [];
$this->lastRequest['request'] = $request;
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Connections/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ public function getLastRequestInfo(): array;
* @param null $body
* @return mixed
*/
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null);
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], ?Transport $transport = null);
}
Loading