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