Skip to content

Added PHP 8.4 Support for Elasticsearch 6.8.x #1420

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
Mar 17, 2025
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.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: [6.8-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 @@ -394,7 +394,7 @@ public function setSniffOnStart(bool $sniffOnStart): ClientBuilder
* @param null|string $password
* @return $this
*/
public function setSSLCert(string $cert, string $password = null): ClientBuilder
public function setSSLCert(string $cert, ?string $password = null): ClientBuilder
{
$this->sslCert = [$cert, $password];

Expand All @@ -406,7 +406,7 @@ public function setSSLCert(string $cert, string $password = null): ClientBuilder
* @param null|string $password
* @return $this
*/
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 @@ -174,7 +174,7 @@ public function __construct(
* @param \Elasticsearch\Transport $transport
* @return mixed
*/
public function performRequest($method, $uri, $params = null, $body = null, $options = [], Transport $transport = null)
public function performRequest($method, $uri, $params = null, $body = null, $options = [], ?Transport $transport = null)
{
if ($body !== null) {
$body = $this->serializer->serialize($body);
Expand Down Expand Up @@ -226,7 +226,7 @@ public function getLastRequestInfo()

private function wrapHandler(callable $handler)
{
return function (array $request, Connection $connection, Transport $transport = null, $options) use ($handler) {
return function (array $request, Connection $connection, ?Transport $transport = null, $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 @@ -112,6 +112,6 @@ public function getLastRequestInfo();
*/
// @codingStandardsIgnoreStart
// "Arguments with default values must be at the end of the argument list" - cannot change the interface
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);
// @codingStandardsIgnoreEnd
}