elastic / elastic/elasticsearch-php

Declaration of Elastic\Elasticsearch\Response\Elasticsearch::withStatus must be compatible

Open
#1,342 23 comments 2 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
5.3k
Forks
963
PR merge metrics
No merged PRs in 30d

Description

Out of nowhere we suddenly get this fatal error popping up.
It looks random, after running the same script again, it works fine.

Declaration of Elastic\Elasticsearch\Response\Elasticsearch::withStatus(int $code, string $reasonPhrase = ''): Psr\Http\Message\ResponseInterface must be compatible with Psr\Http\Message\ResponseInterface::withStatus($code, $reasonPhrase = '')

We do not use this method (withStatus) in our code.

- Operating System: Almalinux 9.2
- PHP Version: 8.2
- ES-PHP client version: 8.8.1
- Elasticsearch version: 8.6

Any ideas how to debug this? Or where to start? Could this be a bug?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.