File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 2626 "symfony/finder" : " ~4.0" ,
2727 "nyholm/psr7" : " ^1.5" ,
2828 "php-http/mock-client" : " ^1.5" ,
29- "symfony/http-client" : " ^5.0|^6.0"
29+ "symfony/http-client" : " ^5.0|^6.0" ,
30+ "php-http/message-factory" : " ^1.1"
3031 },
3132 "autoload" : {
3233 "psr-4" : {
Original file line number Diff line number Diff line change 2121use Elastic \Elasticsearch \Transport \Adapter \AdapterInterface ;
2222use Elastic \Elasticsearch \Transport \Adapter \AdapterOptions ;
2323use Elastic \Elasticsearch \Transport \RequestOptions ;
24+ use Elastic \Transport \Exception \NoAsyncClientException ;
2425use Elastic \Transport \NodePool \NodePoolInterface ;
2526use Elastic \Transport \Transport ;
2627use Elastic \Transport \TransportBuilder ;
@@ -411,8 +412,12 @@ protected function isSymfonyHttpClient(Transport $transport): bool
411412 if (false !== strpos (get_class ($ transport ->getClient ()), 'Symfony\Component\HttpClient ' )) {
412413 return true ;
413414 }
414- if (false !== strpos (get_class ($ transport ->getAsyncClient ()), 'Symfony\Component\HttpClient ' )) {
415- return true ;
415+ try {
416+ if (false !== strpos (get_class ($ transport ->getAsyncClient ()), 'Symfony\Component\HttpClient ' )) {
417+ return true ;
418+ }
419+ } catch (NoAsyncClientException $ e ) {
420+ return false ;
416421 }
417422 return false ;
418423 }
You can’t perform that action at this time.
0 commit comments