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

Code before:
        $rootNode
            ->children()
                ->arrayNode('html_sanitizer')
                    ->info('HtmlSanitizer configuration')
                    ->{$enableIfStandalone('symfony/html-sanitizer', HtmlSanitizerInterface::class)}()
                    ->fixXmlConfig('sanitizer')
                    ->children()
                        ->arrayNode('sanitizers')
                            ->useAttributeAsKey('name')
                            ->arrayPrototype()
                                ->fixXmlConfig('allow_element')
                                ->fixXmlConfig('block_element')
                                ->fixXmlConfig('drop_element')
                                ->fixXmlConfig('allow_attribute')
                                ->fixXmlConfig('drop_attribute')
                                ->fixXmlConfig('force_attribute')
                                ->fixXmlConfig('allowed_link_scheme')
                                ->fixXmlConfig('allowed_link_host')
                                ->fixXmlConfig('allowed_media_scheme')
                                ->fixXmlConfig('allowed_media_host')
                                ->fixXmlConfig('with_attribute_sanitizer')
                                ->fixXmlConfig('without_attribute_sanitizer')
                                ->children()
                                    ->enumNode('default_action')
                                        ->info('Defines how the sanitizer must behave by default.')
                                        ->values(array_map(static fn (HtmlSanitizerAction $action): string => $action->value, HtmlSanitizerAction::cases()))
                                    ->end()
                                    ->booleanNode('allow_safe_elements')
                                        ->info('Allows "safe" elements and attributes.')
                                        ->defaultFalse()
                                    ->end()
                                    ->booleanNode('allow_static_elements')
                                        ->info('Allows all static elements and attributes from the W3C Sanitizer API standard.')
                                        ->defaultFalse()
                                    ->end()
                                    ->arrayNode('allow_elements')
                                        ->info('Configures the elements that the sanitizer should retain from the input. The element name is the key, the value is either a list of allowed attributes for this element or "*" to allow the default set of attributes (https://wicg.github.io/sanitizer-api/#default-configuration).')
                                        ->example(['i' => '*', 'a' => ['title'], 'span' => 'class'])
                                        ->normalizeKeys(false)
                                        ->useAttributeAsKey('name')
                                        ->variablePrototype()
                                            ->beforeNormalization()
                                                ->ifArray()->then(fn ($n) => $n['attribute'] ?? $n)
                                            ->end()
                                            ->validate()
                                                ->ifTrue(fn ($n): bool => !\is_string($n) && !\is_array($n))
                                                ->thenInvalid('The value must be either a string or an array of strings.')
                                            ->end()
                                        ->end()
                                    ->end()
                                    ->arrayNode('block_elements')

Review comment (security):
```suggestion
                                        ->values(array_column(HtmlSanitizerAction::cases(), 'value'))
```

Code after:
                            ->end()
                        ->end()
                        ->arrayNode('smime_signer')
                            ->addDefaultsIfNotSet()
                            ->canBeEnabled()
                            ->info('S/MIME signer configuration')
                            ->children()
                                ->scalarNode('key')
                                    ->info('Path to key (in PEM format)')
                                    ->defaultValue('')
                                    ->cannotBeEmpty()
                                ->end()
                                ->scalarNode('certificate')
                                    ->info('Path to certificate (in PEM format without the `file://` prefix)')
                                    ->defaultValue('')
                                    ->cannotBeEmpty()
                                ->end()
                                ->scalarNode('passphrase')
                                    ->info('The private key passphrase')
                                    ->defaultNull()
                                ->end()
                                ->scalarNode('extra_certificates')->defaultNull()->end()
                                ->integerNode('sign_options')->defaultNull()->end()
                            ->end()
                        ->end()
                        ->arrayNode('smime_encrypter')
                            ->addDefaultsIfNotSet()
                            ->canBeEnabled()
                            ->info('S/MIME encrypter configuration')
                            ->children()
                                ->scalarNode('repository')
                                    ->info('S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`.')
                                    ->defaultValue('')
                                    ->cannotBeEmpty()
                                ->end()
                                ->integerNode('cipher')
                                    ->info('A set of algorithms used to encrypt the message')
                                    ->defaultNull()
                                    ->beforeNormalization()
                                        ->ifString()
                                        ->then(static function ($v): ?int {
                                            if (\defined('OPENSSL_CIPHER_'.$v)) {
                                                return \constant('OPENSSL_CIPHER_'.$v);
                                            }

                                            throw new \InvalidArgumentException(\sprintf('"%s" is not a valid OPENSSL cipher.', $v));
                                        })
                                    ->end()
                                    ->validate()
                                        ->ifTrue(static fn ($v) => \extension_loaded('openssl') && null !== $v && !\defined('OPENSSL_CIPHER_'.$v))
                                        ->thenInvalid('You must provide a valid cipher.')