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