Review main Merged

63235[FEATURE] Use Egulias\EmailValidator for email validation

Georg Ringer CR +2 V +2 Normal +89 −101 updated 02/24/20, 18:34

Commit message

GeneralUtility::validEmail uses now Egulias\EmailValidator instead of
the method `filter_var` for validating an email address. This allows
more email addresses to be valid.

Review

  • Code review CR +2 Done
    • Frank Nägler +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Susi Moog +1
  • Verified V +2 Done
    • Frank Nägler +2
    • Georg Ringer +1
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 7

Review log 1924

  1. Georg Ringer uploaded patch set 1 02/13/20, 12:37

  2. Georg Ringer commented on patch set 1 02/13/20, 12:38

    This change is ready for review.
  3. TYPO3com voted on patch set 1 V -1 02/13/20, 12:50 Completed build in 13m 00s on Thu, 13 Feb, 12:50 PM Test Summary: 18 of 71724 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-49

  4. Georg Ringer uploaded patch set 2 02/13/20, 13:04

  5. TYPO3com voted on patch set 2 V -1 02/13/20, 13:17 Completed build in 12m 48s on Thu, 13 Feb, 01:17 PM Test Summary: 70974 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-50

  6. TYPO3com voted on patch set 2 V +1 02/13/20, 14:00 Completed build in 13m 00s on Thu, 13 Feb, 02:00 PM Test Summary: 71274 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-51

  7. Oliver Klee voted on patch set 2 CR +1 02/13/20, 16:07

  8. Markus Klein commented on patch set 2 02/14/20, 08:04

    EmailAddressValidatorTest.php:37

    IMO this is not a valid address, unless .2 is a valid top-level domain.
  9. Markus Klein commented on patch set 2 02/14/20, 08:04

    Feature-90370-UseEguliasEmailValidatorForEmailValidation.rst:26 Unresolved

    Example needs to be "Abc@def"@example.com
  10. Christian Eßl commented on patch set 2 CR +1 02/15/20, 15:49

    As the Symfony Mime / Mailer components, which are being used by current TYPO3 versions, already use the Egulias/EmailValidator components as well, this would be a great way to streamline the email address validation in TYPO3. Aside from Markus Kleins concerns, the code looks good.
  11. Georg Ringer uploaded patch set 3 02/24/20, 13:11

  12. Christian Eßl voted on patch set 3 CR +1 02/24/20, 13:39

  13. TYPO3com voted on patch set 3 V +1 02/24/20, 13:58 Completed build in 34m 08s on Mon, 24 Feb, 01:58 PM Test Summary: 71598 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-624

  14. Susi Moog commented on patch set 3 02/24/20, 15:57

    EmailAddressValidatorTest.php:37 Reply

    Actually, from the RFC I'd say both this and the next are invalid, as IP addresses need to be in square brackets to validate - however, as we are using a library here, I'd suggest to take whatever that library does and not overcomplicate matters with additional validation rules on our side. What do you think?
  15. Markus Klein commented on patch set 3 02/24/20, 16:31

    EmailAddressValidatorTest.php:37 Reply

    Point taken. But I would remove those tests then, because I don't think it is clever to document wrong behaviour (of a lib) in tests.
  16. Susi Moog commented on patch set 3 02/24/20, 16:33

    EmailAddressValidatorTest.php:37 Reply Unresolved

    yes, makes sense, will take care in a minute (in general it doesn't make that much sense to have tests on the external library)
  17. Susi Moog uploaded patch set 4 02/24/20, 17:13

  18. TYPO3com voted on patch set 4 V +1 02/24/20, 17:27 Completed build in 13m 42s on Mon, 24 Feb, 05:27 PM Test Summary: 71595 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-638

  19. Oliver Klee voted on patch set 4 CR +1 02/24/20, 17:44

  20. Susi Moog voted on patch set 4 V +1 CR +1 02/24/20, 18:20

  21. Susi Moog commented on patch set 4 02/24/20, 18:21

    left the generalUtility tests as we don't have a good way to mock there and they document previous -> new behaviour, but removed them in the EmailAdressValidator (aside from its own functionality) as we don't need three levels of testing external API ;)
  22. Georg Ringer voted on patch set 4 V +1 CR +1 02/24/20, 18:30

  23. Frank Nägler voted on patch set 4 V +2 CR +2 02/24/20, 18:31

  24. Frank Nägler merged patch set 5 02/24/20, 18:34