Update :
When i set in composer.json : "elasticsearch/elasticsearch": "~1.0", it work on windows.
In that case, i create a new Client like this :
$client = new Elasticsearch\Client([
'hosts' => ['https://user:password@##########794843ad237f20a535a369.europe-west1.gcp.cloud.es.io:9243']
]);
But i want to run my php script on ubuntu, and i can't install composer with this config.
It's really strange that it don't work with 6.7 version of elasticsearch.
Did i misunderstand something?