Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
base system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Sep 2022 at 08:58 UTC
Updated:
26 Sep 2022 at 14:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #3
andypostNo idea how tests could be improved but it's ready
Could use explanation about why we are switching to html5 instead of 4.1(strict) but core already did this switch years ago
Comment #4
catchI think we need a follow-up to figure out why the constraint and validator can go out of sync and maybe also to reconcile the email validator service which uses egulias directly with the Symfony validator.
Comment #5
andypostFiled follow-up #3307810: Figure out how email contraint bound to egulias email validator
Comment #6
kristen polTagging
Comment #7
catchComment #8
alexpottThis class override can be removed when we update to SF7.
We'll never use the default mode in Drupal because our constraint is hardcoded to use the strict mode... see \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint
So I think here we should default to strict too. We should make the class final and add an @internal that documents that this class will be removed when we depend on SF7.
Comment #9
alexpottAlso setting to strict forces the \Symfony\Component\Validator\Constraints\EmailValidator to use the EguliasEmailValidator validator in the same way that Drupal does.
Comment #10
catchI am fine with final/internal and defaulting to strict. But... if we default to strict, we can't remove this in Drupal 11 because Symfony's default is HTML5. Just made the language around removal a bit vague to get around this.
Comment #11
catchDiscussed a bit more with @alexpott. Given we ignore the default anyway in practice, if we go with HTML5, we can remove the sublass in 11.x, so make our lives easier.
Comment #12
andypostBack to RTBC as #8 addresed
Comment #13
alexpottCommitted and pushed c3a7a32c5d to 10.1.x and 4a67a410b0 to 10.0.x. Thanks!
Fixed the @internal indentation on commit.