Review main Merged

73694[TASK] Create Extbase validators using ValidatorResolver

Christian Kuhn CR +2 V +2 Normal +88 −62 updated 03/03/22, 10:00

Commit message

With refactoring #96998, Extbase validators
should always be initialized calling setOptions().
Issue #97010 showed this is easy to forget.

The patch avoids instantiating single validators
directly, they are now always instantiated using
ValidatorResolver->createValidator() which takes
care of options setting.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 9

Review log 2129

Show 24 earlier messages
  1. Christian Kuhn uploaded patch set 1 02/24/22, 12:23

  2. core-ci voted on patch set 1 V -1 02/24/22, 12:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24190

  3. core-ci commented on patch set 1 02/24/22, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24190

  4. Christian Kuhn uploaded patch set 2 02/24/22, 18:10

  1. core-ci voted on patch set 2 V -1 02/24/22, 18:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24215

  2. core-ci commented on patch set 2 02/24/22, 22:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24215

  3. Christian Kuhn rebased onto patch set 3 02/24/22, 22:04

  4. core-ci voted on patch set 3 V -1 02/24/22, 22:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24240

  5. Christian Kuhn uploaded patch set 4 02/24/22, 22:44

  6. Christian Kuhn updated the commit message in patch set 5 02/24/22, 22:51

  7. core-ci voted on patch set 5 V +1 02/24/22, 22:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24242

  8. Stefan Bürk voted on patch set 5 V +1 CR +1 02/24/22, 23:27

  9. Oli Bartsch commented on patch set 5 02/25/22, 00:25

    ValidatorResolver.php:54

    Since we are replacing each place in this patch anyways, should we take the opportunity to add the factory now?
  10. Christian Kuhn commented on patch set 5 02/25/22, 00:27

    ValidatorResolver.php:54 Reply

    imho does not make sense to have a dedicated class with a single method that does not do much at the moment. createValidator() is api for a while, i'd say we could keep it to not be breaking without issues at the moment?
  11. Oli Bartsch commented on patch set 5 02/25/22, 00:34

    ValidatorResolver.php:54 Reply

    Basically that's the same for ModuleTemplateFactory. ValidatorResolver is also marked as @internal, so this shouldn't be breaking, right? However, no blocker for me, just spotted the @todo and considered it valid. :)
  12. Christian Kuhn commented on patch set 5 02/25/22, 00:49

    ValidatorResolver.php:54 Reply

    yeah. not strictly breaking. would keep it as is for now, though.
  13. Oli Bartsch commented on patch set 5 02/25/22, 01:18

    ValidatorResolver.php:54 Reply

    Ack
  14. Benni Mack commented on patch set 5 02/25/22, 06:31

    ValidatorResolver.php:54 Reply

    So basically the resolver is the factory :)
  15. Benni Mack commented on patch set 5 02/25/22, 06:31

    factory method is a different design pattern, I guess you mean just "using ValidatorResolver"?
  16. Christian Kuhn commented on patch set 5 03/03/22, 08:17

    Reply

    Done

    ValidatorResolver.php:54 Reply

    removed the @todo now.
  17. Christian Kuhn uploaded patch set 6 03/03/22, 08:18

  18. core-ci voted on patch set 6 V -1 03/03/22, 08:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24495

  19. Christian Kuhn uploaded patch set 7 03/03/22, 08:37

  20. core-ci voted on patch set 7 V +1 03/03/22, 08:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24497

  21. Stefan Bürk voted on patch set 7 CR +1 03/03/22, 09:25

  22. Benni Mack voted on patch set 7 V +1 CR +1 03/03/22, 09:42

  23. Stefan Bürk voted on patch set 7 V +1 03/03/22, 09:46

  24. Christian Kuhn voted on patch set 7 V +2 CR +2 03/03/22, 10:00

  25. Christian Kuhn merged patch set 8 03/03/22, 10:00