73630[TASK] Allow DI for extbase validators
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oli Bartsch +1
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oli Bartsch +1
- Benni Mack +1
- core-ci +1 CI
Issues 5
- Bug #96332Dependency injection not working for extbase validators
- Task #92238Avoid usage of object manager in validation related classes
- Task #95026[TASK] Add missing breaking.rst about service injection in Extbase validators
- Task #94451Avoid ObjectManager in ext:extbase
- Task #94384Avoid ObjectManager in remaining ext:form places
Files 22
- Build/phpstan/phpstan-baseline.neon+20 −5
- typo3/sysext/core/Documentation/Changelog/11.0/Breaking-92238-ServiceInjectionInExtbaseValidators.rst+9 −2
- typo3/sysext/core/Documentation/Changelog/11.5.x/Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst6new+143 −0
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+18 −15
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractCompositeValidator.php+35 −27
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractValidator.php+34 −26
- typo3/sysext/extbase/Classes/Validation/Validator/ValidatorInterface.php4+16 −0
- typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php+9 −1
- typo3/sysext/extbase/Tests/Fixture/ValidatorThatDoesNotImplementValidatorInterfaceValidator.phpdeleted+0 −25
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Classes/Domain/Model/AnotherModel.phprenamed+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Classes/Domain/Model/Model.phprenamed+3 −3
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Classes/Validation/Validator/CustomNotInjectableValidator.phpcopied+8 −3
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Classes/Validation/Validator/CustomValidator.phpnew+57 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Configuration/Services.yamlnew+12 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/ext_emconf.phpnew+21 −0
- typo3/sysext/extbase/Tests/Functional/Validation/Fixture/Controller/TestController.phpdeleted+0 −30
- typo3/sysext/extbase/Tests/Functional/Validation/Fixture/Domain/Validator/ModelValidator.phpdeleted+0 −33
- typo3/sysext/extbase/Tests/Functional/Validation/ValidatorResolverTest.php2+36 −15
- typo3/sysext/extbase/Tests/Unit/Validation/Fixtures/Validation/Validator/CustomValidator.phprenamed+1 −4
- typo3/sysext/extbase/Tests/Unit/Validation/Fixtures/Validation/Validator/CustomValidatorThatDoesNotImplementValidatorInterfaceValidator.phprenamed+1 −4
Review log 2841
Show 916 earlier messages
-
Christian Kuhn uploaded patch set 1 02/21/22, 11:27
-
core-ci voted on patch set 1 V +1 02/21/22, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23979
-
Christian Kuhn uploaded patch set 2 02/21/22, 11:47
-
core-ci voted on patch set 2 V -1 02/21/22, 11:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23981
-
Christian Kuhn uploaded patch set 3 02/21/22, 12:40
-
core-ci voted on patch set 3 V -1 02/21/22, 12:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23984
-
Christian Kuhn commented on patch set 3 CR -1 02/21/22, 14:21
still not the perfect strategy: the v11 change is far to big. will revamp. -
Christian Kuhn uploaded patch set 4 02/21/22, 15:07
-
core-ci voted on patch set 4 V +1 02/21/22, 15:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23991
-
Christian Kuhn uploaded patch set 5 02/21/22, 16:46
-
Christian Kuhn updated the commit message in patch set 6 02/21/22, 16:47
-
Christian Kuhn updated the commit message in patch set 7 02/21/22, 16:50
-
Christian Kuhn updated the commit message in patch set 8 02/21/22, 16:55
-
core-ci voted on patch set 5 V -1 02/21/22, 17:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23992
-
core-ci voted on patch set 6 V -1 02/21/22, 17:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23993
-
core-ci voted on patch set 7 V -1 02/21/22, 17:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23994
-
Christian Kuhn uploaded patch set 9 02/21/22, 17:05
-
core-ci voted on patch set 8 V -1 02/21/22, 17:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23995
-
core-ci voted on patch set 9 V -1 02/21/22, 17:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23996
-
Christian Kuhn uploaded patch set 10 02/21/22, 17:24
-
core-ci voted on patch set 10 V +1 02/21/22, 17:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23997
-
Christian Kuhn updated the commit message in patch set 11 02/21/22, 17:34
-
core-ci voted on patch set 11 V +1 02/21/22, 17:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23999
-
Christian Kuhn uploaded patch set 12 02/21/22, 18:22
-
core-ci voted on patch set 12 V +1 02/21/22, 18:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24005
-
Stefan Bürk voted on patch set 12 CR +1 02/21/22, 18:35
-
Stefan Bürk voted on patch set 12 V +1 02/21/22, 18:40
-
Stefan Froemken commented on patch set 12 02/21/22, 19:48
Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:34typo ;-)Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:42IMO, please use only 3 spaces for first level indent -
Benni Mack commented on patch set 12 02/21/22, 20:02
Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:42Replywe changed this recently AFAIK -
Stefan Froemken commented on patch set 12 02/21/22, 20:13
ValidatorInterface.php:47Please keep that on your list to change with v12, too.ValidatorResolverTest.php:75I don't like the approach to test mocked classes, but I understand that building the environment for "buildBaseValidatorConjunction" could be really hard, so for now, this is OK for me.AbstractRenderable.php:216Damn good. I'm sure I would forget that change here, if this was my patch ;-) -
Stefan Froemken commented on patch set 12 02/21/22, 20:17
ValidatorInterface.php:21As you write "set Validator as shared: false in yaml" wouldn't it be good to add SingletonInterface here? -
Stefan Froemken commented on patch set 12 02/21/22, 20:30
Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:42ReplyCurrent master/main Branch of example documentation for new extensions: https://raw.githubusercontent.com/TYPO3-Documentation/TYPO3CMS-Example-ExtensionManual/main/Documentation/Developer/Index.rst It's still 3 spaces .editorconfig tells 3 spaces, too: https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/CodingGuidelines.html#editorconfig -
Oli Bartsch commented on patch set 12 02/21/22, 21:33
Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:42ReplyCore uses "indent_size = 4", see: https://github.com/TYPO3/typo3/blob/main/.editorconfig#L25. Corresponding patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70159 -
Oli Bartsch voted on patch set 12 V +1 02/21/22, 21:49
-
Christian Kuhn commented on patch set 12 02/22/22, 08:12
Important-96332-ExtbaseValidatorsCanUseDependencyInjection.rst:34ReplyDoneValidatorInterface.php:21Replyno: quite the opposite: validators have state and must not be shared. they're not singletons.ValidatorInterface.php:47ReplyAckValidatorResolverTest.php:75Replyi only moved this down from setUp(). saw no good way to not mock here.AbstractRenderable.php:216ReplyDone -
Christian Kuhn uploaded patch set 13 02/22/22, 08:12
-
core-ci voted on patch set 13 V +1 02/22/22, 08:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24030
-
Benni Mack voted on patch set 13 V +1 CR +1 02/22/22, 08:29
-
Oli Bartsch voted on patch set 13 V +1 CR +1 02/22/22, 08:33
-
Christian Kuhn voted on patch set 13 V +2 CR +2 02/22/22, 08:40
-
Christian Kuhn merged patch set 14 02/22/22, 08:40