elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
5.26k stars 966 forks source link

Typo in NodePool documentation about SimpleNodePool #1269

Closed fgravelaine closed 1 year ago

fgravelaine commented 1 year ago

Summary of problem or feature request

The NodePool documentation has a typo. (SimpleNodePool constructor takes a SelectorInterface as first argument)

Code snippet of problem

use Elastic\Transport\NodePool\Resurrect\ElasticsearchResurrect;
use Elastic\Transport\NodePool\Selector\RoundRobin;
use Elastic\Transport\NodePool\SimpleNodePool;

$nodePool = new SimpleNodePool(
    new SimpleNodePool(),
    new ElasticsearchResurrect()
);

instead of

$nodePool = new SimpleNodePool(
    new RoundRobin(),
    new ElasticsearchResurrect()
);

System details

ezimuel commented 1 year ago

Solved in #1270