Review main Merged

73631[TASK] Allow DI for extbase validators

Christian Kuhn CR +2 V +2 Hard +457 −215 updated 02/22/22, 08:40

Commit message

With #92238, it has been postulated that Extbase
validators should not be dependency injection aware.
Further places following this idea have been done
in v11 with #94451 and #94384. A final breaking
ReST file has been added with #95026.

All of that is pretty unfortunate and there is
simply no reason that Extbase validators can
not get dependencies injected, no matter if
they're not singletons.

This patch specifically targets v11 to allow
dependency injection in Extbase validators again
if extension authors really need this, and don't
want to stick to manual dependency retrieval
as outlined in #95026. This patch should basically
mitigate issues for extension upgrades and paves
the way for a more solid general solution in v12.

Extension authors have a more smooth upgrade path,
especially when supporting two core versions at
the same time.

The v12 version of this patch is identical with
v11 for now - The breaking interface change,
adapting all core validators, and declaring core
validators 'final' in v12 will be done with a
dedicated v12 patch as soon as this
v11 tailored version has been aligned on.

Note all of this is pretty hairy and the solution
outlined with the patch for v11 hopefully gives the
maximum amount of compatibility without being
breaking again, with giving extension authors
additional options, and having v12 options to
further mitigate this complex mess.

Review

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

Issues 5

Files 22

Show 2 more files

Review log 1317

  1. Christian Kuhn uploaded patch set 1 02/21/22, 17:30

  2. Christian Kuhn updated the commit message in patch set 2 02/21/22, 17:34

  3. core-ci voted on patch set 1 V +1 02/21/22, 17:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23998

  4. core-ci voted on patch set 2 V +1 02/21/22, 17:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24000

  5. Christian Kuhn uploaded patch set 3 02/21/22, 18:23

  6. core-ci voted on patch set 3 V +1 02/21/22, 18:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24006

  7. Stefan Bürk voted on patch set 3 CR +1 02/21/22, 18:38

  8. Stefan Bürk voted on patch set 3 V +1 02/21/22, 18:39

  9. Benni Mack voted on patch set 3 V +1 CR +1 02/21/22, 19:33

  10. Oli Bartsch voted on patch set 3 V +1 02/21/22, 21:49

  11. Christian Kuhn uploaded patch set 4 02/22/22, 08:14

  12. core-ci voted on patch set 4 V +1 02/22/22, 08:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24031

  13. Benni Mack voted on patch set 4 V +1 CR +1 02/22/22, 08:30

  14. Oli Bartsch voted on patch set 4 V +1 CR +1 02/22/22, 08:33

  15. Christian Kuhn voted on patch set 4 V +2 CR +2 02/22/22, 08:36

  16. Stefan Bürk voted on patch set 4 V +1 CR +1 02/22/22, 08:38

  17. Christian Kuhn merged patch set 5 02/22/22, 08:40