78142[TASK] Simplify ValidatorResolver::buildBaseValidatorConjunction()
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Markus Klein +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Markus Klein +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractCompositeValidator.php3+6 −3
- typo3/sysext/extbase/Classes/Validation/Validator/ConjunctionValidator.php+6 −0
- typo3/sysext/extbase/Classes/Validation/Validator/DisjunctionValidator.php+6 −0
- typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php7+75 −72
- typo3/sysext/extbase/Tests/Functional/Validation/ValidatorResolverTest.php+1 −5
Review log 2630
Show 45 earlier messages
-
Alexander Schnitzler uploaded patch set 1 03/17/23, 07:33
-
Alexander Schnitzler wrote 03/17/23, 07:35
Topic set to extbase -
core-ci voted on patch set 1 V +1 03/17/23, 07:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39101
-
Oliver Klee voted on patch set 1 CR +1 03/20/23, 10:25
-
Oliver Klee voted on patch set 1 V +1 03/20/23, 10:25
-
Markus Klein commented on patch set 1 CR -1 03/20/23, 16:42
ValidatorResolver.php:173Shouldn't this if be outside of the loop, like it was before? -
Alexander Schnitzler commented on patch set 1 03/20/23, 17:19
ValidatorResolver.php:173ReplyAbsolutely right. Will push a fix. -
Alexander Schnitzler uploaded patch set 2
CR +1V +103/20/23, 17:20 -
Alexander Schnitzler commented on patch set 2 03/20/23, 17:20
ValidatorResolver.php:173ReplyDone -
core-ci voted on patch set 2 V +1 03/20/23, 17:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39263
-
Oliver Klee voted on patch set 2 V +1 CR +1 03/20/23, 17:29
-
Christian Kuhn commented on patch set 2 03/20/23, 19:18
AbstractCompositeValidator.php:39The issue with `__construct()` in abstracts which are API is: This 'pollutes' the constructor and extending classes must call `parent::__construct()` now. Strictly speaking, this is breaking. In this case, it most likely does not matter, though, since probably nobody adds another composite validator and has an own `__construct()`. However, to avoid any discussion in this direction, it might be easier to simply put this constructor to the two extending classes which are not abstract but final already. What do you think? -
Alexander Schnitzler commented on patch set 2 03/20/23, 19:41
AbstractCompositeValidator.php:39ReplyYep, let's do that. This class was marked @api in 2018 but we should mark it @internal, like many many other things. -
Markus Klein commented on patch set 2 03/20/23, 19:55
ValidatorResolver.php:173ReplyHm... what worries me a bit is that tests did not fail with this mistake -
Alexander Schnitzler commented on patch set 2 03/21/23, 06:45
ValidatorResolver.php:173ReplyIIRC we have just one test that checks the amount of validators applied. And it obviously does not cover this case. However, we had the case of duplicate registered validators some time ago. It doesn't result in a change of validation logic, it just eats more cpu time and memory. And besides that: Our test coverage is horrible. Looks like sooo many tests but when you look at the tests, it's very often 90% test setup, building mock hierarchies. -
Markus Klein voted on patch set 2 V +1 CR +1 03/21/23, 07:52
-
Markus Klein voted on patch set 2 V 0 CR 0 03/21/23, 07:53
-
Alexander Schnitzler uploaded patch set 3
CR +1V +103/21/23, 08:25 -
Alexander Schnitzler commented on patch set 3 03/21/23, 08:25
AbstractCompositeValidator.php:39ReplyDone -
core-ci voted on patch set 3 V +1 03/21/23, 08:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39299
-
Markus Klein voted on patch set 3 V +1 CR +1 03/21/23, 08:39
-
Oliver Klee voted on patch set 3 V +1 CR +1 03/21/23, 09:22
-
Christian Kuhn commented on patch set 3 CR -1 03/21/23, 09:23
ValidatorResolver.php:107i'll push on this to clean up the messy comment styling in this method a bit. -
Christian Kuhn uploaded patch set 4
CR +1V +103/21/23, 09:37 -
Christian Kuhn commented on patch set 4 V +1 CR +1 03/21/23, 09:40
ValidatorResolver.php:107ReplyDone. Sorry for messing around on this again ;) -
core-ci voted on patch set 4 V +1 03/21/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39306
-
Markus Klein voted on patch set 4 V +1 CR +1 03/21/23, 09:46
-
Oliver Klee voted on patch set 4 V +1 CR +1 03/21/23, 09:51
-
Christian Kuhn voted on patch set 4 V +2 CR +2 03/21/23, 09:52
-
Christian Kuhn merged patch set 5 03/21/23, 09:52