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