@@ 369-385 (lines=17) @@ | ||
366 | { |
|
367 | $httpClient = $config['discovery']['client']; |
|
368 | ||
369 | if (!empty($httpClient)) { |
|
370 | if ($httpClient === 'auto') { |
|
371 | $httpClient = $this->registerAutoDiscoverableClient( |
|
372 | $container, |
|
373 | 'auto_discovered_client', |
|
374 | $this->configureAutoDiscoveryFactory( |
|
375 | $container, |
|
376 | HttpClientDiscovery::class, |
|
377 | 'auto_discovered_client', |
|
378 | $config |
|
379 | ), |
|
380 | $this->isConfigEnabled($container, $config['profiling']) |
|
381 | ); |
|
382 | } |
|
383 | ||
384 | $httpClient = new Reference($httpClient); |
|
385 | } |
|
386 | ||
387 | $asyncHttpClient = $config['discovery']['async_client']; |
|
388 | ||
@@ 389-405 (lines=17) @@ | ||
386 | ||
387 | $asyncHttpClient = $config['discovery']['async_client']; |
|
388 | ||
389 | if (!empty($asyncHttpClient)) { |
|
390 | if ($asyncHttpClient === 'auto') { |
|
391 | $asyncHttpClient = $this->registerAutoDiscoverableClient( |
|
392 | $container, |
|
393 | 'auto_discovered_async', |
|
394 | $this->configureAutoDiscoveryFactory( |
|
395 | $container, |
|
396 | HttpAsyncClientDiscovery::class, |
|
397 | 'auto_discovered_async', |
|
398 | $config |
|
399 | ), |
|
400 | $this->isConfigEnabled($container, $config['profiling']) |
|
401 | ); |
|
402 | } |
|
403 | ||
404 | $asyncHttpClient = new Reference($asyncHttpClient); |
|
405 | } |
|
406 | ||
407 | if (null === $httpClient && null === $asyncHttpClient) { |
|
408 | $container->removeDefinition('httplug.strategy'); |