Review main Merged Breaking

87982[!!!][TASK] Add setRequest and getRequest to extbase ValidatorInterface

Torben Hansen CR +2 V +2 Normal +87 −37 updated 03/08/25, 20:03

Commit message

With #102951 the PSR-7 request has been introduced to
extbase validators by adding `setRequest()` and
`getRequest()` methods to `AbstractValidator`. It was however
not possible to change the `ValidatorInterface` at that point,
because the change was considered breaking.

With this change, the `ValidatorInterface` is changed to
require the implementation of `setRequest()` and
`getRequest()`.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 1216

  1. Torben Hansen uploaded patch set 1 02/02/25, 18:22

  2. Torben Hansen marked it work in progress 02/02/25, 18:22

  3. core-ci voted on patch set 1 V +1 02/02/25, 18:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73338

  4. Christian Kuhn commented on patch set 1 02/07/25, 12:33

    agreed
  5. Torben Hansen uploaded patch set 2 V +1 03/08/25, 06:17

  6. Torben Hansen marked it ready for review 03/08/25, 06:17

  7. core-ci voted on patch set 2 V +1 03/08/25, 06:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75343

  8. Garvin Hicking commented on patch set 2 03/08/25, 09:50

    Breaking-106056-AddSetRequestAndGetRequestToExtbaseValidatorInterface.rst:22

    Should we soften this by mentioning it's part of the Abstract already, and if you inherit from that you don't need to take care? I guess "real-life" impact is really low and the wording could reflect that to prevent confusion about the need to adapt validators? Also we could mention that the set/getRequest methods can be copied from the abstract if a non-abstract implementation is created in the same sentence?
  9. Torben Hansen uploaded patch set 3 V +1 03/08/25, 10:58

  10. core-ci voted on patch set 3 V +1 03/08/25, 11:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75350

  11. Torben Hansen commented on patch set 3 03/08/25, 11:07

    Breaking-106056-AddSetRequestAndGetRequestToExtbaseValidatorInterface.rst:22 Reply

    I added a note in the "Migratrion" section that we recommend to use `AbstractValidator` if possible. I however do not think it is useful to soften the "Impact" section or describe that `TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator` already implements both methods. As you wrote, real life impact is low and I could only find a few extensions in TER exclusively (and wrongly) implementing `ValidatorInterface`.
  12. Garvin Hicking commented on patch set 4 V +1 03/08/25, 13:23

    Published edit on patch set 3.
  13. Garvin Hicking commented on patch set 4 CR +1 V +1 03/08/25, 13:24

    Breaking-106056-AddSetRequestAndGetRequestToExtbaseValidatorInterface.rst:22 Reply

    Thanks, your change is all I wanted/needed! :)
  14. core-ci voted on patch set 4 V +1 03/08/25, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75351

  15. Benni Mack voted on patch set 4 CR +2 V +2 03/08/25, 20:03

  16. Benni Mack merged patch set 5 03/08/25, 20:03