Skip to content

Commit da8bc22

Browse files
minor #61186 [FrameworkBundle] Don't use Email::VALIDATION_MODES in Configuration (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Don't use Email::VALIDATION_MODES in Configuration | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT The config has to independent of optional deps, thus the fallback path is the only path we should have. The CI ensures we're in sync already. Commits ------- a7ff945 [FrameworkBundle] Don't use Email::VALIDATION_MODES in Configuration
2 parents 1da8ff4 + a7ff945 commit da8bc22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
use Symfony\Component\Serializer\Serializer;
4646
use Symfony\Component\Translation\Translator;
4747
use Symfony\Component\Uid\Factory\UuidFactory;
48-
use Symfony\Component\Validator\Constraints\Email;
4948
use Symfony\Component\Validator\Validation;
5049
use Symfony\Component\Webhook\Controller\WebhookController;
5150
use Symfony\Component\WebLink\HttpHeaderSerializer;
@@ -1067,7 +1066,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
10671066
->validate()->castToArray()->end()
10681067
->end()
10691068
->scalarNode('translation_domain')->defaultValue('validators')->end()
1070-
->enumNode('email_validation_mode')->values(array_merge(class_exists(Email::class) ? Email::VALIDATION_MODES : ['html5-allow-no-tld', 'html5', 'strict'], ['loose']))->end()
1069+
->enumNode('email_validation_mode')->values(['html5', 'html5-allow-no-tld', 'strict', 'loose'])->end()
10711070
->arrayNode('mapping')
10721071
->addDefaultsIfNotSet()
10731072
->fixXmlConfig('path')

0 commit comments

Comments
 (0)