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