The Client.php construction doesn't handle the BasicAuthentication for Elasticsearch and ignores ES_USER and ES_PASSWORD environment variables.
Expected behavior
The construction function should be something like this:
` public function __construct(array $hosts, string $username, string $password, LoggerInterface $logger)
{
if (!empty($username) && !empty($password)) {
$this->client = ClientBuilder::create()
->setHosts($hosts)
->setBasicAuthentication($username, $password)
->build();
} else {
$this->client = ClientBuilder::create()
->setHosts($hosts)
->build();
}
$this->logger = $logger;
$namespace = getenv('ES_NAMESPACE');
$this->namespace = $namespace ? $namespace . '_' : '';
}`
Screenshots

Environment (please complete the following information):
- OS name and version: Ubuntu 20.04.5 LTS x64
- PHP version: PHP 8.1.12
- Elasticsearch version: OpenSearch 2.3
- AdServer version: AdServer v2.1.1
- AdSelect version: AdSelect v1.2.2