Repository: symfony/symfony
File: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php (PHP)

Code before:
                            foreach ($config['scoped_clients'] as &$scopedConfig) {
                                if ($hasDefaultRateLimiter) {
                                    if (!isset($scopedConfig['rate_limiter']) || true === $scopedConfig['rate_limiter']) {
                                        $scopedConfig['rate_limiter'] = $config['default_options']['rate_limiter'];
                                    } elseif (false === $scopedConfig['rate_limiter']) {
                                        $scopedConfig['rate_limiter'] = null;
                                    }
                                }

                                if ($hasDefaultRetryFailed) {
                                    if (!isset($scopedConfig['retry_failed']) || true === $scopedConfig['retry_failed']) {
                                        $scopedConfig['retry_failed'] = $config['default_options']['retry_failed'];
                                    } elseif (\is_array($scopedConfig['retry_failed'])) {
                                        $scopedConfig['retry_failed'] += $config['default_options']['retry_failed'];
                                    }
                                }
                            }

                            return $config;
                        })
                    ->end()
                    ->children()
                        ->integerNode('max_host_connections')
                            ->info('The maximum number of connections to a single host.')
                        ->end()
                            ->booleanNode('use_persistent_connections')
                            ->info('Whether to share open connections, DNS and SSL state between separate Kernel requests.')
                            ->defaultFalse()
                        ->end()
                        ->arrayNode('default_options')
                            ->children()
                                ->arrayNode('headers', 'header')
                                    ->info('Associative array: header => value(s).')
                                    ->useAttributeAsKey('name')
                                    ->normalizeKeys(false)
                                    ->variablePrototype()->end()
                                ->end()
                                ->arrayNode('vars', 'var')
                                    ->info('Associative array: the default vars used to expand the templated URI.')
                                    ->useAttributeAsKey('name')
                                    ->normalizeKeys(false)
                                    ->variablePrototype()->end()
                                ->end()
                                ->integerNode('max_redirects')
                                    ->info('The maximum number of redirects to follow.')
                                ->end()
                                ->scalarNode('http_version')
                                    ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.')
                                ->end()
                                ->arrayNode('resolve')
                                    ->info('Associative array: domain => IP.')

Review comment (suggestion):
```suggestion
                        ->booleanNode('use_persistent_connections')
```

Code after:
                            foreach ($config['scoped_clients'] as &$scopedConfig) {
                                if ($hasDefaultRateLimiter) {
                                    if (!isset($scopedConfig['rate_limiter']) || true === $scopedConfig['rate_limiter']) {
                                        $scopedConfig['rate_limiter'] = $config['default_options']['rate_limiter'];
                                    } elseif (false === $scopedConfig['rate_limiter']) {
                                        $scopedConfig['rate_limiter'] = null;
                                    }
                                }

                                if ($hasDefaultRetryFailed) {
                                    if (!isset($scopedConfig['retry_failed']) || true === $scopedConfig['retry_failed']) {
                                        $scopedConfig['retry_failed'] = $config['default_options']['retry_failed'];
                                    } elseif (\is_array($scopedConfig['retry_failed'])) {
                                        $scopedConfig['retry_failed'] += $config['default_options']['retry_failed'];
                                    }
                                }
                            }

                            return $config;
                        })
                    ->end()
                    ->children()
                        ->integerNode('max_host_connections')
                            ->info('The maximum number of connections to a single host.')
                        ->end()
                        ->arrayNode('default_options')
                            ->children()
                                ->arrayNode('headers', 'header')
                                    ->info('Associative array: header => value(s).')
                                    ->useAttributeAsKey('name')
                                    ->normalizeKeys(false)
                                    ->variablePrototype()->end()
                                ->end()
                                ->arrayNode('vars', 'var')
                                    ->info('Associative array: the default vars used to expand the templated URI.')
                                    ->useAttributeAsKey('name')
                                    ->normalizeKeys(false)
                                    ->variablePrototype()->end()
                                ->end()
                                ->integerNode('max_redirects')
                                    ->info('The maximum number of redirects to follow.')
                                ->end()
                                ->scalarNode('http_version')
                                    ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.')
                                ->end()
                                ->arrayNode('resolve')
                                    ->info('Associative array: domain => IP.')
                                    ->useAttributeAsKey('host')
                                    ->beforeNormalization()
                                        ->ifArray()
                                        ->then(static function ($config) {